saleor-dashboard/src/storybook/stories/components/MoneyRange.tsx

25 lines
664 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import { storiesOf } from "@storybook/react";
import * as React from "react";
import MoneyRange, { MoneyRangeProps } from "@saleor/components/MoneyRange";
import CardDecorator from "../../CardDecorator";
import Decorator from "../../Decorator";
const props: MoneyRangeProps = {
from: {
amount: 5.2,
currency: "USD"
},
to: {
amount: 10.6,
currency: "USD"
}
};
storiesOf("Generics / Money range", module)
.addDecorator(CardDecorator)
.addDecorator(Decorator)
.add("from", () => <MoneyRange {...props} to={undefined} />)
.add("to", () => <MoneyRange {...props} from={undefined} />)
.add("range", () => <MoneyRange {...props} />);