saleor-dashboard/src/storybook/stories/components/AddressEdit.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

35 lines
1 KiB
TypeScript

import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import AddressEdit from "@saleor/components/AddressEdit";
import { storiesOf } from "@storybook/react";
import React from "react";
import { customer } from "../../../customers/fixtures";
import { transformAddressToForm } from "../../../misc";
import { countries } from "../../../orders/fixtures";
import Decorator from "../../Decorator";
storiesOf("Generics / AddressEdit", module)
.addDecorator(Decorator)
.add("default", () => (
<Card
style={{
margin: "auto",
width: 768
}}
>
<CardContent>
<AddressEdit
errors={[]}
data={transformAddressToForm(customer.defaultBillingAddress)}
countries={countries.map(c => ({
label: c.label,
value: c.code
}))}
countryDisplayValue={customer.defaultBillingAddress.country.country}
onChange={undefined}
onCountryChange={() => undefined}
/>
</CardContent>
</Card>
));