import cx from "classnames"; import React from "react"; interface BreadcrumbItemProps { /** Additional CSS classes */ className?: string; /** Current page item */ isCurrent?: boolean; /** Item text */ text: string; /** Item URL. Omit the URL for current item. */ url?: string; /** Additional props */ [key: string]: any; } const ITEM_CLASS_ROOT = "osk-breadcrumbs__item"; const LINK_CLASS_ROOT = "osk-breadcrumbs__link"; const BreadcrumbItem: React.FC = ({ className, isCurrent, text, url, ...other }) => { const itemClasses = cx(ITEM_CLASS_ROOT, className); // If current page, don't render as anchor even if URL is provided if (isCurrent) { return (
  • {text}
  • ); } // If URL provided and not current, render as anchor if (url) { return (
  • {text}
  • ); } // No URL, no current status - just text return (
  • {text}
  • ); }; BreadcrumbItem.displayName = "BreadcrumbItem"; export { BreadcrumbItem };