/** * Predicate signature for `current` function mode. Receives a leaf item's * href and key and returns true if the item should be marked as active. */ export type SidebarCurrentMatcher = (href: string | undefined, key: string) => boolean; /** * String or predicate accepted by `Sidebar.Nav`'s `current` prop. * * - Pass a string (e.g. the current pathname) for smart segment-aware matching. * - Pass a predicate for full control over which leaf is considered active. */ export type SidebarCurrent = string | SidebarCurrentMatcher;