2020-12-14 08:15:50 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { text } from '@storybook/addon-knobs';
|
|
|
|
import { currencyKnob } from '@woocommerce/knobs';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import TotalsFees from '../';
|
|
|
|
|
|
|
|
export default {
|
2021-01-20 20:35:53 +00:00
|
|
|
title: 'WooCommerce Blocks/@blocks-checkout/TotalsFees',
|
2020-12-14 08:15:50 +00:00
|
|
|
component: TotalsFees,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Default = () => {
|
|
|
|
const currency = currencyKnob();
|
2021-01-13 16:57:42 +00:00
|
|
|
const totalFees = text( 'Total fee', '1000' );
|
|
|
|
const totalFeesTax = text( 'Total fee tax', '200' );
|
2020-12-14 08:15:50 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<TotalsFees
|
|
|
|
currency={ currency }
|
2021-01-13 16:57:42 +00:00
|
|
|
cartFees={ [
|
|
|
|
{
|
|
|
|
id: 'fee',
|
|
|
|
name: 'Fee',
|
|
|
|
totals: {
|
|
|
|
total: totalFees,
|
|
|
|
total_tax: totalFeesTax,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
] }
|
2020-12-14 08:15:50 +00:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|