Skip to content

Commit 0cbba59

Browse files
committed
feat: SidebarLeftMulti
1 parent 57fe956 commit 0cbba59

6 files changed

Lines changed: 476 additions & 18 deletions

File tree

src/components/Menus/SidebarLeft.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function SidebarLeft({
154154
mainNav.map((item, index) => (
155155
<Menu key={index} subNav={item} pathName={pathName} Link={Link} />
156156
))}
157-
<SidebarGroup className="mt-auto">
157+
<SidebarGroup className="">
158158
<SidebarGroupContent>
159159
<SidebarMenu>
160160
{secondaryNav &&
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
import {
2+
BookOpen,
3+
Bot,
4+
LifeBuoy,
5+
Send,
6+
Settings2,
7+
SquareTerminal,
8+
} from 'lucide-react'
9+
import { DynamicIcon } from '../Images'
10+
11+
import React from 'react'
12+
import { SidebarLeftMulti } from './SidebarLeftMulti'
13+
import { SidebarProvider } from '@/components/ui/sidebar'
14+
import { fn } from '@storybook/test'
15+
export default {
16+
title: 'Menus/SidebarLeftMulti',
17+
component: SidebarLeftMulti,
18+
}
19+
20+
const Template = (args) => (
21+
<SidebarProvider>
22+
<SidebarLeftMulti {...args} />
23+
</SidebarProvider>
24+
)
25+
//
26+
export const Default = Template.bind({})
27+
// mainNav: [
28+
// {
29+
// title: "Playground",
30+
// url: "#",
31+
// icon: SquareTerminal,
32+
// isActive: true,
33+
// items: [
34+
// {
35+
// title: "History",
36+
// url: "#",
37+
// },
38+
// {
39+
// title: "Starred",
40+
// url: "#",
41+
// },
42+
// ]
43+
// },
44+
Default.args = {
45+
title: 'Playground',
46+
subTitle: 'Airview',
47+
menuHeading: 'Main Menu',
48+
mainNav: [
49+
{
50+
name: 'Models',
51+
nav: [
52+
{
53+
label: 'Playground',
54+
url: '#',
55+
icon: SquareTerminal,
56+
isActive: true,
57+
links: [
58+
{ label: 'History', url: '#' },
59+
{ label: 'Starred', url: '#' },
60+
{ label: 'Settings', url: '#' },
61+
],
62+
},
63+
{
64+
label: 'Models',
65+
url: '#',
66+
icon: Bot,
67+
links: [
68+
{ label: 'Genesis', url: '#' },
69+
{ label: 'Explorer', url: '#' },
70+
{ label: 'Quantum', url: '#' },
71+
],
72+
},
73+
{
74+
label: 'Documentation',
75+
url: '#',
76+
icon: BookOpen,
77+
links: [
78+
{ label: 'Introduction', url: '#' },
79+
{ label: 'Get Started', url: '#' },
80+
{ label: 'Tutorials', url: '#' },
81+
{ label: 'Changelog', url: '#' },
82+
],
83+
},
84+
{
85+
label: 'Settings',
86+
url: '#',
87+
icon: Settings2,
88+
links: [
89+
{ label: 'General', url: '#' },
90+
{ label: 'Team', url: '#' },
91+
{ label: 'Billing', url: '#' },
92+
{ label: 'Limits', url: '#' },
93+
],
94+
},
95+
],
96+
},
97+
{
98+
name: '2nd Menu',
99+
nav: [
100+
{
101+
label: 'Playground',
102+
url: '#',
103+
icon: SquareTerminal,
104+
isActive: true,
105+
links: [
106+
{ label: 'History', url: '#' },
107+
{ label: 'Starred', url: '#' },
108+
{ label: 'Settings', url: '#' },
109+
],
110+
},
111+
],
112+
},
113+
],
114+
secondaryNav: [
115+
{
116+
label: 'Support',
117+
url: '#',
118+
icon: LifeBuoy,
119+
},
120+
{
121+
label: 'Feedback',
122+
url: '#',
123+
icon: Send,
124+
},
125+
],
126+
onNavClick: fn(),
127+
}
128+
129+
130+
131+
export const Loading = Template.bind({})
132+
Loading.args = {
133+
title: 'Playground',
134+
loading: true,
135+
subTitle: 'Airview',
136+
menuHeading: 'Main Menu',
137+
mainNav: undefined,
138+
secondaryNav: undefined,
139+
onNavClick: fn(),
140+
}
141+
const GithubIcon = () => <DynamicIcon iconName="github" type="brands" />
142+
143+
export const CustomIcons = Template.bind({})
144+
CustomIcons.args = {
145+
title: 'Playground',
146+
subTitle: 'Airview',
147+
menuHeading: 'Main Menu',
148+
mainNav: [{
149+
name: 'Models',
150+
nav: [
151+
{
152+
label: 'Kubernetes',
153+
url: '/collections/solutions/solutions/kubernetes/_index.md',
154+
icon: GithubIcon,
155+
type: 'published',
156+
links: [
157+
{
158+
label: 'High Level Design',
159+
url: '/solutions/designs/high_level_design_lczbvf99/_index.md',
160+
type: 'published',
161+
},
162+
{
163+
label: 'Istio Ambient Mesh',
164+
url: '/solutions/designs/istio_ambient_mesh_leemxsdx/_index.md',
165+
type: 'published',
166+
},
167+
{
168+
label: 'AWS Landing Zone - Elastic Kubernetes Service (EKS)',
169+
url: '/solutions/designs/elastic_kubernetes_service_eks_ljwysr3d/_index.md',
170+
type: 'published',
171+
},
172+
],
173+
},
174+
{
175+
label: 'AI Contact Centre',
176+
url: '/collections/solutions/solutions/contact_centre/_index.md',
177+
type: 'published',
178+
},
179+
// Additional items follow the same structure...
180+
],
181+
},
182+
],
183+
}
184+
185+
export const NoArgs = Template.bind({})
186+
NoArgs.args = {}

0 commit comments

Comments
 (0)