fleet-memory/hindsight-docs/src/theme/Navbar/MobileSidebar/index.tsx
Nicolò Boschi 522b71aab8
doc: mental models (#199)
* doc: mental models

* doc: mental models
2026-01-26 14:27:08 +01:00

27 lines
964 B
TypeScript

import React, {type ReactNode} from 'react';
import {
useLockBodyScroll,
useNavbarMobileSidebar,
} from '@docusaurus/theme-common/internal';
import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu';
import NavbarMobileSidebarSecondaryMenu from '@theme/Navbar/MobileSidebar/SecondaryMenu';
export default function NavbarMobileSidebar(): ReactNode {
const mobileSidebar = useNavbarMobileSidebar();
useLockBodyScroll(mobileSidebar.shown);
// Always render when shown - breakpoint controlled by CSS at 1400px
if (!mobileSidebar.shown) {
return null;
}
return (
<NavbarMobileSidebarLayout
header={<NavbarMobileSidebarHeader />}
primaryMenu={<NavbarMobileSidebarPrimaryMenu />}
secondaryMenu={<NavbarMobileSidebarSecondaryMenu />}
/>
);
}