MCPcopy Create free account
hub / github.com/IABTechLab/uid2docs / MobileSidebarToggle

Function MobileSidebarToggle

src/theme/Navbar/MobileSidebar/Toggle/index.tsx:6–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import IconMenu from "@theme/Icon/Menu";
5
6export default function MobileSidebarToggle(): JSX.Element {
7 const { toggle, shown } = useNavbarMobileSidebar();
8 return (
9 <button
10 onClick={toggle}
11 aria-label={translate({
12 id: "theme.docs.sidebar.toggleSidebarButtonAriaLabel",
13 message: "Toggle navigation bar",
14 description:
15 "The ARIA label for hamburger menu button of mobile navigation",
16 })}
17 aria-expanded={shown}
18 className="navbar__toggle clean-btn"
19 type="button"
20 >
21 <IconMenu />
22 </button>
23 );
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected