@luscii-healthtech/web-ui 31.0.0 → 31.1.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.development.js +21 -1
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -4885,7 +4885,27 @@ const BreadcrumbDividerItem = ({ onClick, truncatedCrumbs }) => {
|
|
|
4885
4885
|
);
|
|
4886
4886
|
};
|
|
4887
4887
|
|
|
4888
|
-
const
|
|
4888
|
+
const renderBreadcrumbItem = ({ link, name, textProps }) => {
|
|
4889
|
+
if (typeof link !== "undefined" && link !== null) {
|
|
4890
|
+
return React__namespace.default.createElement(
|
|
4891
|
+
"a",
|
|
4892
|
+
{ href: link },
|
|
4893
|
+
React__namespace.default.createElement(Text, Object.assign({}, textProps), name)
|
|
4894
|
+
);
|
|
4895
|
+
}
|
|
4896
|
+
return React__namespace.default.createElement(Text, Object.assign({}, textProps), name);
|
|
4897
|
+
};
|
|
4898
|
+
const Breadcrumbs = ({
|
|
4899
|
+
crumbs,
|
|
4900
|
+
truncateAfter = Infinity,
|
|
4901
|
+
/**
|
|
4902
|
+
* `renderItem` is a required prop, but in Vitals not
|
|
4903
|
+
* everything is type-safe yet. Because of this we
|
|
4904
|
+
* supply a default value here, so we make absolutely
|
|
4905
|
+
* sure that the prop is always present and never breaks.
|
|
4906
|
+
*/
|
|
4907
|
+
renderItem = renderBreadcrumbItem
|
|
4908
|
+
}) => {
|
|
4889
4909
|
const [head, ...tail] = crumbs;
|
|
4890
4910
|
const [isTruncated, setIsTruncated] = React.useState(tail.length > truncateAfter);
|
|
4891
4911
|
const truncatedCrumbs = [];
|