saleor-dashboard/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx

22 lines
780 B
TypeScript
Raw Normal View History

2019-09-04 13:09:19 +00:00
import CardDecorator from "@saleor/storybook/CardDecorator";
import Decorator from "@saleor/storybook/Decorator";
import { formError } from "@saleor/storybook/misc";
import { storiesOf } from "@storybook/react";
import React from "react";
2019-09-04 13:09:19 +00:00
import ResetPasswordPage, { ResetPasswordPageProps } from "./ResetPasswordPage";
2019-09-02 13:52:43 +00:00
2019-09-04 13:09:19 +00:00
const props: ResetPasswordPageProps = {
disabled: false,
error: undefined,
onSubmit: () => undefined
};
2019-09-02 13:52:43 +00:00
storiesOf("Views / Authentication / Reset password", module)
2019-09-04 13:09:19 +00:00
.addDecorator(CardDecorator)
2019-09-02 13:52:43 +00:00
.addDecorator(Decorator)
2019-09-04 13:09:19 +00:00
.add("default", () => <ResetPasswordPage {...props} />)
.add("loading", () => <ResetPasswordPage {...props} disabled={true} />)
.add("error", () => (
<ResetPasswordPage {...props} error={formError("").message} />
2019-09-02 19:23:37 +00:00
));