saleor-dashboard/src/staff/components/StaffListPage/StaffListPage.stories.tsx
Krzysztof Wolski 082a12e0b8
Permission groups section (#406)
* Add permission groups 👪
2020-04-23 17:43:08 +02:00

43 lines
1.1 KiB
TypeScript

import { storiesOf } from "@storybook/react";
import React from "react";
import { StaffListUrlSortField } from "@saleor/staff/urls";
import { StaffMemberStatus } from "@saleor/types/globalTypes";
import {
pageListProps,
searchPageProps,
tabPageProps,
sortPageProps,
filterPageProps
} from "@saleor/fixtures";
import { staffMembers } from "@saleor/staff/fixtures";
import Decorator from "@saleor/storybook/Decorator";
import StaffListPage, { StaffListPageProps } from ".";
const props: StaffListPageProps = {
...pageListProps.default,
...searchPageProps,
...sortPageProps,
...tabPageProps,
...filterPageProps,
filterOpts: {
status: {
active: false,
value: StaffMemberStatus.ACTIVE
}
},
onAdd: undefined,
onBack: () => undefined,
sort: {
...sortPageProps.sort,
sort: StaffListUrlSortField.name
},
staffMembers
};
storiesOf("Views / Staff / Staff members", module)
.addDecorator(Decorator)
.add("default", () => <StaffListPage {...props} />)
.add("when loading", () => (
<StaffListPage {...props} disabled={true} staffMembers={undefined} />
));