saleor-dashboard/src/webhooks/components/WebhooksListPage/WebhookListPage.stories.tsx
Krzysztof Bialoglowicz f97319c47a Fix storybook
2019-10-10 14:48:19 +02:00

30 lines
887 B
TypeScript

import { storiesOf } from "@storybook/react";
import React from "react";
import {
listActionsProps,
pageListProps,
searchPageProps,
tabPageProps
} from "@saleor/fixtures";
import Decorator from "@saleor/storybook/Decorator";
import { webhookList } from "../../fixtures";
import WebhooksListPage, { WebhooksListPageProps } from "./WebhooksListPage";
const props: WebhooksListPageProps = {
...listActionsProps,
...pageListProps.default,
...searchPageProps,
...tabPageProps,
onBack: () => undefined,
onRemove: () => undefined,
webhooks: webhookList
};
storiesOf("Views / Services / Service list", module)
.addDecorator(Decorator)
.add("default", () => <WebhooksListPage {...props} />)
.add("loading", () => (
<WebhooksListPage {...props} disabled={true} webhooks={undefined} />
))
.add("no data", () => <WebhooksListPage {...props} webhooks={[]} />);