saleor-dashboard/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx
Krzysztof Wolski a82de30309
Add circleci config and enhance our linters (#519)
* Add circleci config

* Season linting config

* Apply code style
2020-05-14 11:30:32 +02:00

28 lines
928 B
TypeScript

import CardDecorator from "@saleor/storybook//CardDecorator";
import Decorator from "@saleor/storybook//Decorator";
import { AccountErrorCode } from "@saleor/types/globalTypes";
import { storiesOf } from "@storybook/react";
import React from "react";
import NewPasswordPage from "./NewPasswordPage";
storiesOf("Views / Authentication / Set up a new password", module)
.addDecorator(CardDecorator)
.addDecorator(Decorator)
.add("default", () => (
<NewPasswordPage errors={[]} disabled={false} onSubmit={() => undefined} />
))
.add("loading", () => (
<NewPasswordPage errors={[]} disabled={true} onSubmit={() => undefined} />
))
.add("too short error", () => (
<NewPasswordPage
errors={["password"].map(field => ({
__typename: "AccountError",
code: AccountErrorCode.PASSWORD_TOO_SHORT,
field
}))}
disabled={false}
onSubmit={() => undefined}
/>
));