2020-12-14 08:15:50 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { text } from '@storybook/addon-knobs';
|
|
|
|
import { currencyKnob } from '@woocommerce/knobs';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import TotalsItem from '../';
|
|
|
|
|
|
|
|
export default {
|
2021-01-20 20:35:53 +00:00
|
|
|
title: 'WooCommerce Blocks/@blocks-checkout/TotalsItem',
|
2020-12-14 08:15:50 +00:00
|
|
|
component: TotalsItem,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Default = () => {
|
|
|
|
const currency = currencyKnob();
|
|
|
|
const description = text(
|
|
|
|
'Description',
|
|
|
|
'This is the amount that will be charged to your card.'
|
|
|
|
);
|
|
|
|
const label = text( 'Label', 'Amount' );
|
|
|
|
const value = text( 'Value', '1000' );
|
|
|
|
|
|
|
|
return (
|
|
|
|
<TotalsItem
|
|
|
|
currency={ currency }
|
|
|
|
description={ description }
|
|
|
|
label={ label }
|
|
|
|
value={ value }
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|