@ndlib/component-library 0.0.91 → 0.0.92
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.
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
import _ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
3
14
|
import { ArrowLink } from '../../elements/ArrowLink';
|
|
@@ -12,6 +23,7 @@ import { COLOR } from '../../../theme/colors';
|
|
|
12
23
|
import { importedDefaultComponentShim } from '../../../utils/misc';
|
|
13
24
|
const ChevronRightIcon = importedDefaultComponentShim(_ChevronRightIcon);
|
|
14
25
|
export const NavMenu = (props) => {
|
|
26
|
+
const { sx } = props, rest = __rest(props, ["sx"]);
|
|
15
27
|
const { isOpen, activePath, getMenuItem, getMenuItemProps, getMenuProps } = useMenu();
|
|
16
28
|
if (!isOpen) {
|
|
17
29
|
return null;
|
|
@@ -23,14 +35,7 @@ export const NavMenu = (props) => {
|
|
|
23
35
|
return null;
|
|
24
36
|
}
|
|
25
37
|
const submenu = activeTopLevelMenu.action.submenu;
|
|
26
|
-
return (_jsxs(Row, Object.assign({},
|
|
27
|
-
justifyContent: 'center',
|
|
28
|
-
p: 3,
|
|
29
|
-
border: 'solid 1px',
|
|
30
|
-
borderColor: COLOR.EXTRA_LIGHT_GRAY,
|
|
31
|
-
borderRadius: '4px',
|
|
32
|
-
margin: '0px 10px 0px 10px',
|
|
33
|
-
} }, { children: [_jsx(Column, { sx: { flexGrow: 1 } }), submenu.items.map((submenuItem, i) => {
|
|
38
|
+
return (_jsxs(Row, Object.assign({}, rest, { sx: Object.assign({ justifyContent: 'center', p: 3, border: 'solid 1px', borderColor: COLOR.EXTRA_LIGHT_GRAY, bg: COLOR.WHITE, borderRadius: '4px', margin: '0px 10px 0px 10px' }, sx) }, { children: [_jsx(Column, { sx: { flexGrow: 1 } }), submenu.items.map((submenuItem, i) => {
|
|
34
39
|
if (!(submenuItem.action.type === MENU_ACTION_TYPE.SUBMENU)) {
|
|
35
40
|
return null;
|
|
36
41
|
}
|