2019-06-19 14:40:52 +00:00
|
|
|
import { storiesOf } from "@storybook/react";
|
2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
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} />);
|