docs(uishell): add side nav story

This commit is contained in:
Marcus Feitoza 2020-04-18 15:18:46 -03:00
commit ee9f3e295c
2 changed files with 28 additions and 0 deletions

View file

@ -111,6 +111,24 @@
{#if story === 'header'} {#if story === 'header'}
<Header {...$$props} /> <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'} {:else if story === 'header-with-nav'}
<Header {...$$props}> <Header {...$$props}>
<HeaderNav> <HeaderNav>

View file

@ -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 = () => ({ export const HeaderWithNav = () => ({
Component, Component,
props: { props: {