MCPcopy
hub / github.com/marmelab/react-admin / WithDashboard

Function WithDashboard

packages/ra-ui-materialui/src/layout/Menu.stories.tsx:66–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64};
65
66export const WithDashboard = () => {
67 const MenuDefault = () => <Menu hasDashboard={true} dense={false} />;
68 const DefaultLayout = ({ children }) => (
69 <Layout menu={MenuDefault}>{children}</Layout>
70 );
71 const Dashboard = () => <Page title="Dashboard" />;
72
73 return (
74 <Admin
75 store={memoryStore()}
76 dataProvider={testDataProvider()}
77 layout={DefaultLayout}
78 dashboard={Dashboard}
79 >
80 {resources.map((resource, index) => (
81 <Resource
82 name={resource}
83 key={`resource_${index}`}
84 list={<DemoList name={resource} />}
85 />
86 ))}
87 </Admin>
88 );
89};
90
91export const Dense = () => {
92 const MenuDense = () => <Menu hasDashboard={true} dense={true} />;

Callers

nothing calls this directly

Calls 2

memoryStoreFunction · 0.90
testDataProviderFunction · 0.90

Tested by

no test coverage detected