@movable/ui 0.11.0 → 0.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonProps } from '@mui/material';
|
|
1
|
+
import { ButtonProps, MenuProps, MenuItemProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
type ButtonPropsType = ButtonProps & {
|
|
4
4
|
label: ReactNode;
|
|
@@ -6,10 +6,12 @@ type ButtonPropsType = ButtonProps & {
|
|
|
6
6
|
type MenuOptionType = {
|
|
7
7
|
label: ReactNode;
|
|
8
8
|
onClick: () => void;
|
|
9
|
+
menuItemProps?: Partial<MenuItemProps>;
|
|
9
10
|
};
|
|
10
11
|
type DropdownActionType = {
|
|
11
12
|
label: ReactNode;
|
|
12
13
|
menuOptions: MenuOptionType[];
|
|
14
|
+
menuProps?: Partial<MenuProps>;
|
|
13
15
|
};
|
|
14
16
|
type PageHeaderActionButtonsProps = {
|
|
15
17
|
primaryAction?: ButtonPropsType;
|
package/lib/index.mjs
CHANGED
|
@@ -669,9 +669,9 @@ function la({ primaryAction: e, secondaryAction: r, tertiaryAction: o, dropdownA
|
|
|
669
669
|
}, transformOrigin: {
|
|
670
670
|
vertical: "top",
|
|
671
671
|
horizontal: "right"
|
|
672
|
-
}, children: (g = n.menuOptions) == null ? void 0 : g.map(({ label: p, onClick: m },
|
|
672
|
+
}, ...n.menuProps, children: (g = n.menuOptions) == null ? void 0 : g.map(({ label: p, onClick: m, menuItemProps: l }, E) => V.jsx(Jt, { onClick: () => {
|
|
673
673
|
m(), f();
|
|
674
|
-
}, children: p },
|
|
674
|
+
}, ...l, children: p }, E)) })] }), o && V.jsx(nr, { variant: "contained", color: "inherit", ...o, children: o.label }), r && V.jsx(nr, { variant: "contained", color: "inherit", ...r, children: r.label }), e && V.jsx(nr, { variant: "contained", ...e, sx: { whiteSpace: "nowrap" }, children: e.label })] });
|
|
675
675
|
}
|
|
676
676
|
function ca({ subtitle: e }) {
|
|
677
677
|
return V.jsx(Xe, { variant: "body2", color: "text.secondary", children: e });
|