import type { ReactNode } from 'react' import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from 'ui' interface SidebarBreadcrumbProps { label: string 'aria-label': string parent?: { label: string; onClick: () => void } action?: ReactNode } export const SidebarBreadcrumb = ({ label, 'aria-label': ariaLabel, parent, action, }: SidebarBreadcrumbProps) => { return ( <> {parent && ( <> { if (event.key === 'Enter' || event.key === ' ') { event.preventDefault() parent.onClick() } }} title={parent.label} className="min-w-0 cursor-pointer truncate no-underline focus-ring" > {parent.label} )} {label} {action &&
{action}
} ) }