2019-09-04 13:09:19 +00:00
|
|
|
import CardDecorator from "@saleor/storybook/CardDecorator";
|
|
|
|
import Decorator from "@saleor/storybook/Decorator";
|
2023-01-05 12:34:34 +00:00
|
|
|
import { formError } from "@saleor/storybook/formError";
|
2020-05-14 09:30:32 +00:00
|
|
|
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,
|
2022-06-21 09:36:55 +00:00
|
|
|
onSubmit: () => undefined,
|
2019-09-04 13:09:19 +00:00
|
|
|
};
|
2023-01-05 12:34:34 +00:00
|
|
|
storiesOf("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
|
|
|
));
|