UNPKG

hoda-react

Version:

<div align="center"> <h1>:construction: flowbite-react (unreleased) :construction:</h1> <p> <a href="https://flowbite-react.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src=".github/assets/flowbite-react-github.png"> <

14 lines (13 loc) 1.02 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import classNames from 'classnames'; import { forwardRef } from 'react'; import { HiOutlineChevronRight } from 'react-icons/hi'; import { useTheme } from '../Flowbite/ThemeContext'; const BreadcrumbItem = forwardRef(({ children, className, href, icon: Icon, ...props }, ref) => { const isLink = typeof href !== 'undefined'; const theme = useTheme().theme.breadcrumb.item; const Component = isLink ? 'a' : 'span'; return (_jsxs("li", { className: classNames(theme.base, className), ...props, children: [_jsx(HiOutlineChevronRight, { "aria-hidden": true, className: theme.chevron, "data-testid": "flowbite-breadcrumb-separator" }), _jsxs(Component, { ref: ref, className: theme.href[isLink ? 'on' : 'off'], "data-testid": "flowbite-breadcrumb-item", href: href, children: [Icon && _jsx(Icon, { "aria-hidden": true, className: theme.icon }), children] })] })); }); BreadcrumbItem.displayName = 'Breadcrumb.Item'; export default BreadcrumbItem;