@particle-academy/react-fancy 4.16.0 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9351,6 +9351,7 @@ function BreadcrumbsItem({
|
|
|
9351
9351
|
children,
|
|
9352
9352
|
href,
|
|
9353
9353
|
active = false,
|
|
9354
|
+
onClick,
|
|
9354
9355
|
className
|
|
9355
9356
|
}) {
|
|
9356
9357
|
const baseClass = cn(
|
|
@@ -9361,6 +9362,18 @@ function BreadcrumbsItem({
|
|
|
9361
9362
|
if (href && !active) {
|
|
9362
9363
|
return /* @__PURE__ */ jsxRuntime.jsx("a", { "data-react-fancy-breadcrumbs-item": "", href, className: baseClass, children });
|
|
9363
9364
|
}
|
|
9365
|
+
if (onClick && !active) {
|
|
9366
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9367
|
+
"button",
|
|
9368
|
+
{
|
|
9369
|
+
type: "button",
|
|
9370
|
+
"data-react-fancy-breadcrumbs-item": "",
|
|
9371
|
+
onClick,
|
|
9372
|
+
className: cn(baseClass, "cursor-pointer border-0 bg-transparent p-0"),
|
|
9373
|
+
children
|
|
9374
|
+
}
|
|
9375
|
+
);
|
|
9376
|
+
}
|
|
9364
9377
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-breadcrumbs-item": "", className: baseClass, "aria-current": active ? "page" : void 0, children });
|
|
9365
9378
|
}
|
|
9366
9379
|
BreadcrumbsItem.displayName = "BreadcrumbsItem";
|