saleor-dashboard/src/storybook/stories/customers/CustomerAddressDialog.tsx

26 lines
801 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import { storiesOf } from "@storybook/react";
import * as React from "react";
import CustomerAddressDialog, {
CustomerAddressDialogProps
} from "../../../customers/components/CustomerAddressDialog";
import { customer } from "../../../customers/fixtures";
import { countries } from "../../../fixtures";
import Decorator from "../../Decorator";
const props: CustomerAddressDialogProps = {
address: customer.addresses[0],
confirmButtonState: "default",
countries,
errors: [],
onClose: () => undefined,
onConfirm: () => undefined,
open: true,
variant: "create"
};
storiesOf("Customers / Address editing dialog", module)
.addDecorator(Decorator)
.add("default", () => <CustomerAddressDialog {...props} />)
.add("edit", () => <CustomerAddressDialog {...props} variant="edit" />);