saleor-dashboard/src/auth/components/ResetPasswordPage/ResetPasswordPage.stories.tsx
2023-01-05 13:34:34 +01:00

21 lines
778 B
TypeScript

import CardDecorator from "@saleor/storybook/CardDecorator";
import Decorator from "@saleor/storybook/Decorator";
import { formError } from "@saleor/storybook/formError";
import { storiesOf } from "@storybook/react";
import React from "react";
import ResetPasswordPage, { ResetPasswordPageProps } from "./ResetPasswordPage";
const props: ResetPasswordPageProps = {
disabled: false,
error: undefined,
onSubmit: () => undefined,
};
storiesOf("Authentication / Reset password", module)
.addDecorator(CardDecorator)
.addDecorator(Decorator)
.add("default", () => <ResetPasswordPage {...props} />)
.add("loading", () => <ResetPasswordPage {...props} disabled={true} />)
.add("error", () => (
<ResetPasswordPage {...props} error={formError("").message} />
));