MCPcopy Index your code
hub / github.com/SyntaxUI/syntaxui / MobileNavigation

Function MobileNavigation

src/components/MobileNavigation.tsx:152–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}))
151
152export function MobileNavigation() {
153 let isInsideMobileNavigation = useIsInsideMobileNavigation()
154 let { isOpen, toggle, close } = useMobileNavigationStore()
155 let ToggleIcon = isOpen ? XIcon : MenuIcon
156
157 return (
158 <IsInsideMobileNavigationContext.Provider value={true}>
159 <button
160 type="button"
161 className="flex h-6 w-10 items-center justify-center rounded-md transition hover:bg-zinc-900/5 dark:hover:bg-white/5"
162 aria-label="Toggle navigation"
163 onClick={toggle}
164 >
165 <ToggleIcon className="w-3 stroke-zinc-900 dark:stroke-white" />
166 </button>
167 {!isInsideMobileNavigation && (
168 <Suspense fallback={null}>
169 <MobileNavigationDialog isOpen={isOpen} close={close} />
170 </Suspense>
171 )}
172 </IsInsideMobileNavigationContext.Provider>
173 )
174}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected