@@ -296,7 +296,7 @@ export type MenuItem = BaseMenuItem & {
type Props = {
type Props = {
brand?: React.ReactNode,
brand?: React.ReactNode,
sidebarMain: React.ReactChild,
sidebarMain? : React.ReactChild,
sidebarMainOpen?: boolean,
sidebarMainOpen?: boolean,
sidebarMenuItems: MenuItem[],
sidebarMenuItems: MenuItem[],
moreItemsOpen?: boolean,
moreItemsOpen?: boolean,
@@ -353,7 +353,7 @@ export const Layout: React.FC<Props> = ({
<TopBar
<TopBar
wide
wide
brand={brand}
brand={brand}
menuLink={menuLink}
menuLink={sidebarMain ? menuLink : undefined }
userLink={userLink}
userLink={userLink}
>
>
{topBarCenter}
{topBarCenter}
@@ -404,13 +404,21 @@ export const Layout: React.FC<Props> = ({
</MoreSecondarySidebarMenuGroup>
</MoreSecondarySidebarMenuGroup>
</MoreItemsScroll>
</MoreItemsScroll>
</MoreItemsComponent>
</MoreItemsComponent>
<MoreToggleSidebarMenuItem>
<SidebarMenuItem>
<LinkComponent
{...moreLinkMenuItem}
/>
</SidebarMenuItem>
</MoreToggleSidebarMenuItem>
{
(
morePrimarySidebarMenuItems.length > 0
|| moreSecondarySidebarMenuItems.length > 0
)
&& (
<MoreToggleSidebarMenuItem>
<SidebarMenuItem>
<LinkComponent
{...moreLinkMenuItem}
/>
</SidebarMenuItem>
</MoreToggleSidebarMenuItem>
)
}
{
{
visibleSecondarySidebarMenuItems.length > 0
visibleSecondarySidebarMenuItems.length > 0
&& (
&& (
@@ -429,9 +437,14 @@ export const Layout: React.FC<Props> = ({
}
}
</SidebarMenuSize>
</SidebarMenuSize>
</SidebarMenu>
</SidebarMenu>
<SidebarMainComponent>
{sidebarMain}
</SidebarMainComponent>
{
(sidebarMain as unknown)
&& (
<SidebarMainComponent>
{sidebarMain}
</SidebarMainComponent>
)
}
</SidebarBase>
</SidebarBase>
<ContentBase>
<ContentBase>
{children}
{children}