UNPKG

@furystack/shades-common-components

Version:

Common UI components for FuryStack Shades

46 lines 1.63 kB
import type { PartialElement } from '@furystack/shades'; import type { BreadcrumbItem } from './breadcrumb.js'; /** * Props for the RouteBreadcrumb component. */ export type RouteBreadcrumbProps = { homeItem?: BreadcrumbItem; separator?: string | JSX.Element; lastItemClickable?: boolean; /** * When true, the root `'/'` path segment is excluded from the generated items. * Typically the root is represented by `homeItem` instead. * @default true */ skipRootPath?: boolean; } & PartialElement<HTMLElement>; /** * Breadcrumb component that automatically derives its items from the current * {@link RouteMatchService} match chain. It resolves route titles from * `meta.title` (supporting async resolvers) and accumulates path segments * to produce the correct `href` for each breadcrumb link. * * @example * ```tsx * <RouteBreadcrumb * homeItem={{ path: '/', label: <Icon icon={icons.home} size="small" /> }} * separator=" › " * /> * ``` */ export declare const RouteBreadcrumb: (props: { homeItem?: BreadcrumbItem; separator?: string | JSX.Element; lastItemClickable?: boolean; /** * When true, the root `'/'` path segment is excluded from the generated items. * Typically the root is represented by `homeItem` instead. * @default true */ skipRootPath?: boolean; } & Omit<Partial<HTMLElement>, "style"> & { style?: Partial<CSSStyleDeclaration>; } & { ref?: import("@furystack/shades").RefObject<Element>; }, children?: import("@furystack/shades").ChildrenList) => JSX.Element; //# sourceMappingURL=route-breadcrumb.d.ts.map