@apexcura/ui-components 0.0.16-Beta42 → 0.0.16-Beta44
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.js +11 -10
- package/dist/index.mjs +11 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -787,26 +787,27 @@ var Sidebar = (props) => {
|
|
|
787
787
|
function getItem(label, key, icon, children, item) {
|
|
788
788
|
return {
|
|
789
789
|
key,
|
|
790
|
-
icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName
|
|
790
|
+
icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
|
|
791
791
|
children,
|
|
792
792
|
label,
|
|
793
793
|
onClick: () => handleChange(item)
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
796
|
const items = props.items?.map((eachItem, index) => {
|
|
797
|
+
const childItems = eachItem.items?.map(
|
|
798
|
+
(child, childIndex) => getItem(
|
|
799
|
+
child.label,
|
|
800
|
+
`${index}-${childIndex}`,
|
|
801
|
+
child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
802
|
+
void 0,
|
|
803
|
+
child
|
|
804
|
+
)
|
|
805
|
+
);
|
|
797
806
|
return getItem(
|
|
798
807
|
eachItem.label,
|
|
799
808
|
index.toString(),
|
|
800
809
|
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: eachItem.icon, alt: "" }) : null,
|
|
801
|
-
|
|
802
|
-
(child, childIndex) => getItem(
|
|
803
|
-
child.label,
|
|
804
|
-
`${index}-${childIndex}`,
|
|
805
|
-
child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
806
|
-
void 0,
|
|
807
|
-
child
|
|
808
|
-
)
|
|
809
|
-
),
|
|
810
|
+
childItems,
|
|
810
811
|
eachItem
|
|
811
812
|
);
|
|
812
813
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -716,26 +716,27 @@ var Sidebar = (props) => {
|
|
|
716
716
|
function getItem(label, key, icon, children, item) {
|
|
717
717
|
return {
|
|
718
718
|
key,
|
|
719
|
-
icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName
|
|
719
|
+
icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
|
|
720
720
|
children,
|
|
721
721
|
label,
|
|
722
722
|
onClick: () => handleChange(item)
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
725
|
const items = props.items?.map((eachItem, index) => {
|
|
726
|
+
const childItems = eachItem.items?.map(
|
|
727
|
+
(child, childIndex) => getItem(
|
|
728
|
+
child.label,
|
|
729
|
+
`${index}-${childIndex}`,
|
|
730
|
+
child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
731
|
+
void 0,
|
|
732
|
+
child
|
|
733
|
+
)
|
|
734
|
+
);
|
|
726
735
|
return getItem(
|
|
727
736
|
eachItem.label,
|
|
728
737
|
index.toString(),
|
|
729
738
|
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ React15.createElement("img", { src: eachItem.icon, alt: "" }) : null,
|
|
730
|
-
|
|
731
|
-
(child, childIndex) => getItem(
|
|
732
|
-
child.label,
|
|
733
|
-
`${index}-${childIndex}`,
|
|
734
|
-
child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
735
|
-
void 0,
|
|
736
|
-
child
|
|
737
|
-
)
|
|
738
|
-
),
|
|
739
|
+
childItems,
|
|
739
740
|
eachItem
|
|
740
741
|
);
|
|
741
742
|
});
|