carbon-react 123.11.0 → 123.11.1
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.
|
@@ -45,7 +45,13 @@ export const MenuFullscreen = ({
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
const
|
|
48
|
+
const flattenedChildren = React.Children.toArray(children);
|
|
49
|
+
const childArray = React.Children.toArray(flattenedChildren.map((child, index) => {
|
|
50
|
+
if (index < flattenedChildren.length - 1) {
|
|
51
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, child, /*#__PURE__*/React.createElement(MenuDivider, null));
|
|
52
|
+
}
|
|
53
|
+
return child;
|
|
54
|
+
}));
|
|
49
55
|
return /*#__PURE__*/React.createElement("li", {
|
|
50
56
|
"aria-label": "menu-fullscreen"
|
|
51
57
|
}, /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(FocusTrap, {
|
|
@@ -89,6 +95,6 @@ export const MenuFullscreen = ({
|
|
|
89
95
|
openSubmenuId: null,
|
|
90
96
|
setOpenSubmenuId: /* istanbul ignore next */() => {}
|
|
91
97
|
}
|
|
92
|
-
},
|
|
98
|
+
}, childArray)))))));
|
|
93
99
|
};
|
|
94
100
|
export default MenuFullscreen;
|
|
@@ -54,7 +54,13 @@ const MenuFullscreen = ({
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
const
|
|
57
|
+
const flattenedChildren = _react.default.Children.toArray(children);
|
|
58
|
+
const childArray = _react.default.Children.toArray(flattenedChildren.map((child, index) => {
|
|
59
|
+
if (index < flattenedChildren.length - 1) {
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, child, /*#__PURE__*/_react.default.createElement(_menuDivider.default, null));
|
|
61
|
+
}
|
|
62
|
+
return child;
|
|
63
|
+
}));
|
|
58
64
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
59
65
|
"aria-label": "menu-fullscreen"
|
|
60
66
|
}, /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_focusTrap.default, {
|
|
@@ -98,7 +104,7 @@ const MenuFullscreen = ({
|
|
|
98
104
|
openSubmenuId: null,
|
|
99
105
|
setOpenSubmenuId: /* istanbul ignore next */() => {}
|
|
100
106
|
}
|
|
101
|
-
},
|
|
107
|
+
}, childArray)))))));
|
|
102
108
|
};
|
|
103
109
|
exports.MenuFullscreen = MenuFullscreen;
|
|
104
110
|
var _default = MenuFullscreen;
|