/*! Strand UI | MIT License | dillingerstaffing.com */ import type { ComponentChildren, JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface BreadcrumbItem { label: string; href?: string; /** Called when the item is activated; without an href the item renders as a button. */ onClick?: (e: MouseEvent) => void; } export interface BreadcrumbProps extends Omit, "children" | "label"> { /** The path; the last item is the current page. */ items: BreadcrumbItem[]; /** Separator between items. */ separator?: ComponentChildren; /** `instrument` renders the trail as a mono uppercase readout. */ variant?: "default" | "instrument"; /** Accessible name of the navigation landmark. */ label?: string; } /** * Hierarchical navigation path. * * @example * */ export const Breadcrumb = forwardRef( ({ items, separator = "/", variant = "default", label = "Breadcrumb", className = "", ...rest }, ref) => ( ), ); Breadcrumb.displayName = "Breadcrumb";