@ctlyst.id/internal-ui 3.1.22 → 3.1.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -130,7 +130,7 @@ interface BreadCrumbParentProps {
|
|
130
130
|
name: string;
|
131
131
|
onClick?: () => void;
|
132
132
|
disable?: boolean;
|
133
|
-
link
|
133
|
+
link?: string;
|
134
134
|
}
|
135
135
|
interface BreadCrumbProps {
|
136
136
|
title: string;
|
@@ -141,6 +141,7 @@ interface BreadCrumbProps {
|
|
141
141
|
spacing?: number;
|
142
142
|
backButton?: () => void;
|
143
143
|
hideTitle?: boolean;
|
144
|
+
homeButton?: () => void;
|
144
145
|
}
|
145
146
|
declare const BreadCrumb: React$1.FC<BreadCrumbProps>;
|
146
147
|
|
package/dist/index.d.ts
CHANGED
@@ -130,7 +130,7 @@ interface BreadCrumbParentProps {
|
|
130
130
|
name: string;
|
131
131
|
onClick?: () => void;
|
132
132
|
disable?: boolean;
|
133
|
-
link
|
133
|
+
link?: string;
|
134
134
|
}
|
135
135
|
interface BreadCrumbProps {
|
136
136
|
title: string;
|
@@ -141,6 +141,7 @@ interface BreadCrumbProps {
|
|
141
141
|
spacing?: number;
|
142
142
|
backButton?: () => void;
|
143
143
|
hideTitle?: boolean;
|
144
|
+
homeButton?: () => void;
|
144
145
|
}
|
145
146
|
declare const BreadCrumb: React$1.FC<BreadCrumbProps>;
|
146
147
|
|
package/dist/index.js
CHANGED
@@ -727,7 +727,7 @@ var import_react9 = require("@chakra-ui/react");
|
|
727
727
|
var import_internal_icon4 = require("@ctlyst.id/internal-icon");
|
728
728
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
729
729
|
var BreadCrumb = (props) => {
|
730
|
-
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton, hideTitle } = props;
|
730
|
+
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton, homeButton, hideTitle } = props;
|
731
731
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
732
732
|
import_react9.Box,
|
733
733
|
{
|
@@ -736,7 +736,6 @@ var BreadCrumb = (props) => {
|
|
736
736
|
display: "flex",
|
737
737
|
justifyContent: "space-between",
|
738
738
|
alignItems: "center",
|
739
|
-
paddingY: 2,
|
740
739
|
children: [
|
741
740
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react9.Box, { display: "flex", alignItems: "center", children: [
|
742
741
|
!hideTitle && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
@@ -773,9 +772,11 @@ var BreadCrumb = (props) => {
|
|
773
772
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
774
773
|
import_react9.BreadcrumbLink,
|
775
774
|
{
|
775
|
+
"data-test-id": "",
|
776
776
|
alignItems: "center",
|
777
|
-
href:
|
777
|
+
href: homeButton || disableHome ? void 0 : "/",
|
778
778
|
style: { ...disableHome && { cursor: "default" } },
|
779
|
+
onClick: homeButton,
|
779
780
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Box, { boxSize: "3.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.Home, { size: 3.5, color: "primary.500" }) })
|
780
781
|
}
|
781
782
|
) }),
|
@@ -783,7 +784,7 @@ var BreadCrumb = (props) => {
|
|
783
784
|
import_react9.BreadcrumbLink,
|
784
785
|
{
|
785
786
|
"data-test-id": "",
|
786
|
-
href: !val.disable ? val.link : void 0,
|
787
|
+
href: !val.disable && val.link ? val.link : void 0,
|
787
788
|
onClick: val.onClick,
|
788
789
|
style: {
|
789
790
|
...val.disable && {
|