2023-01-05 12:34:34 +00:00
|
|
|
import {
|
|
|
|
listActionsProps,
|
|
|
|
pageListProps,
|
|
|
|
sortPageProps,
|
2023-01-16 09:45:12 +00:00
|
|
|
} 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
|
|
|
|
2023-05-12 11:06:27 +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,
|
2022-06-21 09:36:55 +00:00
|
|
|
sort: MenuListUrlSortField.name,
|
|
|
|
},
|
2019-06-19 14:40:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-12 11:06:27 +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={[]} />;
|