/*! Strand UI | MIT License | dillingerstaffing.com */ import type { ComponentChildren, JSX } from "preact"; export interface NavItem { label: string; href: string; active?: boolean; } export interface NavProps extends Omit, "logo"> { /** Rendered on the left. */ logo?: ComponentChildren; items?: NavItem[]; /** Rendered on the right. */ actions?: ComponentChildren; /** Fixed, frosted bar (DL 11.5); the stylesheet pads `body` for it via `body:has(.strand-nav--glass)`. */ glass?: boolean; /** Render the hamburger and its panel below the md breakpoint. Pass `false` for an application shell that carries its destinations in a tab bar (DL 19.1.1). */ mobileMenu?: boolean; /** Controlled open state of the mobile menu; internal when omitted. */ menuOpen?: boolean; /** Called with the next open state when the hamburger is pressed. */ onMenuToggle?: (open: boolean) => void; } /** * Top navigation bar with a logo slot, links, actions and a mobile menu. * * @example *