UNPKG

@atlaskit/breadcrumbs

Version:

Breadcrumbs are a navigation system used to show a user's location in a site or app.

48 lines (47 loc) • 1.29 kB
/* breadcrumbs-item-primitive.tsx generated by @compiled/babel-plugin v3.0.2 */ import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { forwardRef } from 'react'; import BreadcrumbsItemBase from './internal/breadcrumbs-item-base'; /** * __BreadcrumbsItemPrimitive__ * * A primitive breadcrumb item that renders an `<li>` with a separator and the * correct link/button styling — without any overflow/collapse wiring. * * The `ref` is forwarded to the `<li>` element so it can be passed directly to * `registerItem(index)` from `useOverflowCollapse`. * * @example * ```tsx * <BreadcrumbsItemPrimitive * ref={registerItem(index)} * href="/home" * text="Home" * /> * ``` */ const BreadcrumbsItemPrimitive = /*#__PURE__*/forwardRef(({ text, href, onClick, target, elemBefore, truncationWidth, testId, xcss, 'aria-current': ariaCurrent }, ref) => /*#__PURE__*/React.createElement(BreadcrumbsItemBase, { ref: ref, href: href, elemBefore: elemBefore, onClick: onClick, target: target, testId: testId, text: text, truncationWidth: truncationWidth, "aria-current": ariaCurrent, xcss: xcss })); // eslint-disable-next-line @repo/internal/react/require-jsdoc export default BreadcrumbsItemPrimitive;