'use client'; import { useState } from 'react'; import { CloseIcon } from '@/components/icons/CloseIcon'; import { GitHubIcon } from '@/components/icons/GitHubIcon'; import { HamburgerIcon } from '@/components/icons/HamburgerIcon'; import Link from '@/components/Link'; import { DocsSearchProvider } from './DocsSearchProvider'; import { SearchButton } from './SearchButton'; import { ThemeToggle } from './ThemeToggle'; import { Wordmark } from './Wordmark'; const NAV_LINKS = [ { label: 'Docs', href: '/docs' }, { label: 'Plugins', href: '/docs/plugins' }, { label: 'Playground', href: '/playground' }, { label: 'Resources', href: '/resources' }, { label: 'Sponsors', href: '/sponsors' }, ]; export function Header() { const [mobileOpen, setMobileOpen] = useState(false); return (
{/* Switch to the drawer when enlarged text leaves too little room. The container query in global.css measures space in text units. */}
GitHub {/* Compact search trigger — visible below sm: where the labelled pill is hidden. */} {/* Drawer trigger — paired with the desktop container breakpoint. */}
{/* Drawer — also serves readers using enlarged text on desktop. */} {mobileOpen && ( )}
); }