-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
59 lines (52 loc) · 1.4 KB
/
index.stories.tsx
File metadata and controls
59 lines (52 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import SidebarGroup from '#ui/Containers/Sidebar/SidebarGroup';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';
type Story = StoryObj<typeof SidebarGroup>;
type Meta = MetaObj<typeof SidebarGroup>;
export const Default: Story = {
args: {
groupName: 'Example Group',
items: [
{ label: 'Item 1', link: '/item1' },
{ label: 'Item 2', link: '/item2' },
{ label: 'Item 3', link: '/item3' },
],
},
};
export const CustomGroup: Story = {
args: {
groupName: 'Custom Group',
items: [
{ label: 'Custom Item 1', link: '/custom-item1' },
{ label: 'Custom Item 2', link: '/custom-item2' },
],
},
};
export const EmptyGroup: Story = {
args: {
groupName: 'Empty Group',
items: [],
},
};
export const NestedGroup: Story = {
args: {
groupName: 'Nested Group',
pathname: '/nested/folder-b/leaf-2',
items: [
{ label: 'Flat Item', link: '/nested/flat' },
{
label: 'Folder A',
link: '/nested/folder-a',
items: [{ label: 'Leaf A.1', link: '/nested/folder-a/leaf-1' }],
},
{
label: 'Folder B',
link: '/nested/folder-b',
items: [
{ label: 'Leaf B.1', link: '/nested/folder-b/leaf-1' },
{ label: 'Leaf B.2 (Active)', link: '/nested/folder-b/leaf-2' },
],
},
],
},
};
export default { component: SidebarGroup } as Meta;