import { Omit } from "@material-ui/core"; import { storiesOf } from "@storybook/react"; import React from "react"; import CustomerCreatePage, { CustomerCreatePageFormData, CustomerCreatePageProps } from "../../../customers/components/CustomerCreatePage"; import Decorator from "../../Decorator"; import { formError } from "../../misc"; const props: Omit = { countries: [ { __typename: "CountryDisplay", code: "UK", country: "United Kingdom" }, { __typename: "CountryDisplay", code: "PL", country: "Poland" } ], disabled: false, errors: [], onBack: () => undefined, onSubmit: () => undefined, saveButtonBar: "default" }; storiesOf("Views / Customers / Create customer", module) .addDecorator(Decorator) .add("default", () => ) .add("loading", () => ) .add("form errors", () => ( ).map(field => formError(field) )} /> ));