mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
docs(uishell): add side nav story
This commit is contained in:
parent
9fd3b82dd6
commit
ee9f3e295c
2 changed files with 28 additions and 0 deletions
|
@ -111,6 +111,24 @@
|
|||
|
||||
{#if story === 'header'}
|
||||
<Header {...$$props} />
|
||||
{:else if story === 'sidenav'}
|
||||
<SideNav isOpen={true}>
|
||||
<SideNavItems>
|
||||
<SideNavMenu text="Menu 01" icon={iCatalog}>
|
||||
<SideNavMenuItem text="Sub 01" href="/" />
|
||||
<SideNavMenuItem text="Sub 02" href="/" />
|
||||
<SideNavMenuItem text="Sub 03" href="/" />
|
||||
<SideNavMenuItem text="Sub 04" href="/" />
|
||||
</SideNavMenu>
|
||||
<SideNavMenu text="Menu 02" icon={iAdjust}>
|
||||
<SideNavMenuItem text="Sub 01" href="/" />
|
||||
<SideNavMenuItem text="Sub 02" href="/" />
|
||||
<SideNavMenuItem text="Sub 03" href="/" />
|
||||
<SideNavMenuItem text="Sub 04" href="/" />
|
||||
</SideNavMenu>
|
||||
<SideNavLink text="Menu 03" href="/" icon={iProtection} />
|
||||
</SideNavItems>
|
||||
</SideNav>
|
||||
{:else if story === 'header-with-nav'}
|
||||
<Header {...$$props}>
|
||||
<HeaderNav>
|
||||
|
|
|
@ -13,6 +13,16 @@ export const Header = () => ({
|
|||
}
|
||||
});
|
||||
|
||||
export const Sidenav = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: 'sidenav',
|
||||
href: text('The link href (href)', '#'),
|
||||
company: text('Company name', 'IBM'),
|
||||
platformName: text('Platform name', 'Platform Name')
|
||||
}
|
||||
});
|
||||
|
||||
export const HeaderWithNav = () => ({
|
||||
Component,
|
||||
props: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue