Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

feat(storybook): add iconless nested sidenav items story (#1899)

Cindy Zhang50644f7c0bf8
diff --git a/apps/storybook/stories/SideNav.stories.tsx b/apps/storybook/stories/SideNav.stories.tsx
index bae6ddf214..3dd622a2a7 100644
--- a/apps/storybook/stories/SideNav.stories.tsx
+++ b/apps/storybook/stories/SideNav.stories.tsx
@@ -589,3 +589,49 @@ export const CollapsibleItems: Story = {
</XDSSideNav>
),
};
+
+// =============================================================================
+// Iconless Items with Nested Children
+// =============================================================================
+
+export const IconlessNestedItems: Story = {
+ name: 'Iconless Nested Items',
+ render: () => (
+ <XDSSideNav
+ header={
+ <XDSSideNavHeading
+ icon={
+ <XDSNavIcon icon={<CubeIcon style={{width: 16, height: 16}} />} />
+ }
+ heading="My App"
+ />
+ }>
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem
+ label="Dashboard"
+ icon={HomeIcon}
+ selectedIcon={HomeIconSolid}
+ isSelected
+ href="/dashboard"
+ />
+ <XDSSideNavItem
+ label="Settings"
+ icon={Cog6ToothIcon}
+ collapsible>
+ <XDSSideNavItem label="General" href="/settings/general" />
+ <XDSSideNavItem label="Security" href="/settings/security" />
+ <XDSSideNavItem
+ label="Notifications"
+ href="/settings/notifications"
+ />
+ </XDSSideNavItem>
+ <XDSSideNavItem label="Reports" collapsible>
+ <XDSSideNavItem label="Monthly" href="/reports/monthly" />
+ <XDSSideNavItem label="Quarterly" href="/reports/quarterly" />
+ <XDSSideNavItem label="Annual" href="/reports/annual" />
+ </XDSSideNavItem>
+ <XDSSideNavItem label="Analytics" icon={ChartBarIcon} href="/analytics" />
+ </XDSSideNavSection>
+ </XDSSideNav>
+ ),
+};