@mankindui/core
Version:
- a react component library - you can see how @mankindui/core can be used via examples: [usage examples](https://github.com/clarklindev/mankindui-test)
20 lines (19 loc) • 955 B
JavaScript
import { j as r } from "../../_virtual/jsx-runtime.js";
import "../../node_modules/react-router-dom/dist/index.js";
import { Link as o } from "../../node_modules/react-router/dist/development/chunk-NL6KNZEE.js";
const d = ({ path: n }) => {
let s = "";
const a = n.split("/").filter((e) => e.trim() !== "").map((e, c, l) => {
s += `/${e}`;
const t = c === l.length - 1;
return /* @__PURE__ */ r.jsxs("span", { className: "flex items-center", children: [
/* @__PURE__ */ r.jsx(o, { to: s, className: `text-blue-600 hover:underline ${t ? "font-semibold" : ""}`, children: decodeURIComponent(e).replace(/-/g, " ").replace(/\b\w/g, (m) => m.toUpperCase()) }),
!t && /* @__PURE__ */ r.jsx("span", { className: "mx-2 text-gray-500", children: "/" })
] }, s);
});
return /* @__PURE__ */ r.jsx("nav", { className: "breadcrumbs flex space-x-1", children: a });
};
export {
d as Breadcrumb
};
//# sourceMappingURL=index.js.map