saleor-dashboard/src/storybook/stories/components/WeightRange.tsx
2019-08-09 12:26:22 +02:00

24 lines
655 B
TypeScript

import { storiesOf } from "@storybook/react";
import 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} />);