UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

43 lines (42 loc) 1.26 kB
import { jsx as e } from "react/jsx-runtime"; import s from "../IconSvg/IconSvg.js"; import { truncateString as u } from "../../utils/functions/StringUtils.js"; import { Breadcrumbs as f, Tooltip as h, Typography as x, Link as i } from "@mui/material"; import { Link as a } from "react-router"; function b() { return /* @__PURE__ */ e(s, { icon: "chevronRight" }); } function C(c) { const { items: m, sx: l, maxBreadcrumbLength: o } = c; return /* @__PURE__ */ e( f, { separator: /* @__PURE__ */ e(b, {}), itemsBeforeCollapse: 2, itemsAfterCollapse: 2, sx: l, children: m.map((r, n) => { let t = r.text; o && (t = u(r.text, o)); const p = t !== r.text ? r.text : null; return /* @__PURE__ */ e(h, { title: p, placement: "top", children: /* @__PURE__ */ e(x, { variant: "breadcrumb1", children: r.current ? t : /* @__PURE__ */ e( i, { component: r.to ? a : i, to: r.to, href: r.href, onClick: r.onClick, underline: "hover", children: t }, n ) }) }, n); }) } ); } export { C as Breadcrumbs, C as default }; //# sourceMappingURL=Breadcrumbs.js.map