@fixefy/fixefy-ui-components 0.2.92 → 0.2.93
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.
|
@@ -12,6 +12,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
13
|
const _material = require("@mui/material");
|
|
14
14
|
const _FxIcon = require("../FxIcon");
|
|
15
|
+
const _FxMenuItemWithIcon = require("../FxMenuItemWithIcon");
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) {
|
|
16
17
|
if (typeof WeakMap !== "function") return null;
|
|
17
18
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -59,9 +60,12 @@ const FxModalWithButton = ({ btnType = 'text', color, btnValue, modalData, onCli
|
|
|
59
60
|
const handleClick = (e)=>{
|
|
60
61
|
if (onClick) {
|
|
61
62
|
onClick();
|
|
63
|
+
setIsOpen((prev)=>!prev);
|
|
64
|
+
setAnchorEl(e.currentTarget);
|
|
65
|
+
} else {
|
|
66
|
+
setIsOpen((prev)=>!prev);
|
|
67
|
+
setAnchorEl(e.currentTarget);
|
|
62
68
|
}
|
|
63
|
-
setIsOpen((prev)=>!prev);
|
|
64
|
-
setAnchorEl(e.currentTarget);
|
|
65
69
|
};
|
|
66
70
|
const handleClose = ()=>{
|
|
67
71
|
setIsOpen(false);
|
|
@@ -111,7 +115,16 @@ const FxModalWithButton = ({ btnType = 'text', color, btnValue, modalData, onCli
|
|
|
111
115
|
open: isOpen,
|
|
112
116
|
onClose: handleClose,
|
|
113
117
|
TransitionComponent: _material.Fade,
|
|
114
|
-
children: isOpen && modalData
|
|
118
|
+
children: isOpen && (modalData === null || modalData === void 0 ? void 0 : modalData.map((item, i)=>{
|
|
119
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxMenuItemWithIcon.FxMenuItemWithIcon, {
|
|
120
|
+
icon: item.icon,
|
|
121
|
+
title: item.title,
|
|
122
|
+
onClick: ()=>{
|
|
123
|
+
handleClose();
|
|
124
|
+
item.onClick();
|
|
125
|
+
}
|
|
126
|
+
}, i);
|
|
127
|
+
}))
|
|
115
128
|
})
|
|
116
129
|
]
|
|
117
130
|
});
|
package/package.json
CHANGED