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

25 lines
660 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 WeightRange, { WeightRangeProps } from "@saleor/components/WeightRange";
import CardDecorator from "../../CardDecorator";
import Decorator from "../../Decorator";
const props: WeightRangeProps = {
from: {
unit: "kg",
value: 4.2
},
to: {
unit: "kg",
value: 81.9
}
};
storiesOf("Generics / Weight range", module)
.addDecorator(CardDecorator)
.addDecorator(Decorator)
.add("from", () => <WeightRange {...props} to={undefined} />)
.add("to", () => <WeightRange {...props} from={undefined} />)
.add("range", () => <WeightRange {...props} />);