import { storiesOf } from "@storybook/react"; import React from "react"; import AttributePage, { AttributePageProps } from "@saleor/attributes/components/AttributePage"; import { attribute } from "@saleor/attributes/fixtures"; import { AttributeInputTypeEnum, ProductErrorCode } from "@saleor/types/globalTypes"; import Decorator from "../../Decorator"; const props: AttributePageProps = { attribute, disabled: false, errors: [], onBack: () => undefined, onDelete: () => undefined, onSubmit: () => undefined, onValueAdd: () => undefined, onValueDelete: () => undefined, onValueReorder: () => undefined, onValueUpdate: () => undefined, saveButtonBarState: "default", values: attribute.values }; storiesOf("Views / Attributes / Attribute details", module) .addDecorator(Decorator) .add("default", () => ) .add("loading", () => ( )) .add("no values", () => ) .add("form errors", () => ( ({ __typename: "ProductError", code: ProductErrorCode.INVALID, field }))} /> )) .add("multiple select input", () => ( )) .add("create", () => );