saleor-dashboard/src/navigation/components/MenuListPage/MenuListPage.stories.tsx

37 lines
955 B
TypeScript
Raw Normal View History

2023-01-05 12:34:34 +00:00
import {
listActionsProps,
pageListProps,
sortPageProps,
} from "@dashboard/fixtures";
import { menuList } from "@dashboard/navigation/fixtures";
import { MenuListUrlSortField } from "@dashboard/navigation/urls";
2019-08-09 10:26:22 +00:00
import React from "react";
2019-06-19 14:40:52 +00:00
import { PaginatorContextDecorator } from "../../../../.storybook/decorators";
2023-01-05 12:34:34 +00:00
import MenuListPage, { MenuListPageProps } from "./MenuListPage";
2019-06-19 14:40:52 +00:00
const props: MenuListPageProps = {
...pageListProps.default,
...listActionsProps,
2019-12-17 17:13:56 +00:00
...sortPageProps,
2019-06-19 14:40:52 +00:00
menus: menuList,
2019-12-17 17:13:56 +00:00
onDelete: () => undefined,
sort: {
...sortPageProps.sort,
sort: MenuListUrlSortField.name,
},
2019-06-19 14:40:52 +00:00
};
export default {
title: "Navigation / Menu list",
decorators: [PaginatorContextDecorator],
};
export const Default = () => <MenuListPage {...props} />;
export const Loading = () => (
<MenuListPage {...props} disabled={true} menus={undefined} />
);
export const NoData = () => <MenuListPage {...props} menus={[]} />;