@fixefy/fixefy-ui-components 0.2.87 → 0.2.88
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,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxModalWithButton: ({ color, btnValue, modalData, onClick, disabled, }: {
|
|
2
|
+
export declare const FxModalWithButton: ({ btnType, color, btnValue, modalData, onClick, disabled, icon, }: {
|
|
3
|
+
btnType?: 'text' | 'icon';
|
|
3
4
|
color?: 'secondary' | undefined;
|
|
4
5
|
btnValue: string;
|
|
5
6
|
modalData: any;
|
|
6
7
|
onClick?: any;
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
8
10
|
}) => React.JSX.Element;
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "FxModalWithButton", {
|
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
13
|
const _material = require("@mui/material");
|
|
14
|
+
const _FxIcon = require("../FxIcon");
|
|
14
15
|
function _getRequireWildcardCache(nodeInterop) {
|
|
15
16
|
if (typeof WeakMap !== "function") return null;
|
|
16
17
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -52,7 +53,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
52
53
|
}
|
|
53
54
|
return newObj;
|
|
54
55
|
}
|
|
55
|
-
const FxModalWithButton = ({ color, btnValue, modalData, onClick, disabled })=>{
|
|
56
|
+
const FxModalWithButton = ({ btnType = 'text', color, btnValue, modalData, onClick, disabled, icon })=>{
|
|
56
57
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
57
58
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
58
59
|
const handleClick = (e)=>{
|
|
@@ -73,7 +74,7 @@ const FxModalWithButton = ({ color, btnValue, modalData, onClick, disabled })=>{
|
|
|
73
74
|
]);
|
|
74
75
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
75
76
|
children: [
|
|
76
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
77
|
+
btnType == 'text' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
77
78
|
disabled: disabled,
|
|
78
79
|
color: color || 'primary',
|
|
79
80
|
id: "fade-button",
|
|
@@ -90,7 +91,17 @@ const FxModalWithButton = ({ color, btnValue, modalData, onClick, disabled })=>{
|
|
|
90
91
|
},
|
|
91
92
|
children: btnValue
|
|
92
93
|
}),
|
|
93
|
-
'
|
|
94
|
+
btnType == 'icon' && icon && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.IconButton, {
|
|
95
|
+
onClick: onClick,
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
98
|
+
icon: icon,
|
|
99
|
+
width: 20,
|
|
100
|
+
height: 20
|
|
101
|
+
}),
|
|
102
|
+
' '
|
|
103
|
+
]
|
|
104
|
+
}),
|
|
94
105
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
95
106
|
id: "fade-menu",
|
|
96
107
|
MenuListProps: {
|
package/package.json
CHANGED