@fixefy/fixefy-ui-components 0.2.94 → 0.2.96

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,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, onClick, disabled, icon, }: {
2
+ export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, onClick, disabled, icon, shouldShowModal, }: {
3
3
  btnType?: 'text' | 'icon';
4
4
  color?: 'secondary' | undefined;
5
5
  btnValue?: string;
@@ -7,4 +7,5 @@ export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, on
7
7
  onClick?: any;
8
8
  disabled?: boolean;
9
9
  icon?: string;
10
+ shouldShowModal?: boolean;
10
11
  }) => React.JSX.Element;
@@ -54,7 +54,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
54
54
  }
55
55
  return newObj;
56
56
  }
57
- const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick, disabled, icon })=>{
57
+ const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick, disabled, icon, shouldShowModal = true })=>{
58
58
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
59
59
  const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
60
60
  const handleClick = (e)=>{
@@ -81,6 +81,11 @@ const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick
81
81
  btnType == 'text' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
82
82
  disabled: disabled,
83
83
  color: color || 'primary',
84
+ startIcon: icon ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
85
+ icon: icon,
86
+ width: 20,
87
+ height: 20
88
+ }) : null,
84
89
  id: "fade-button",
85
90
  "aria-haspopup": "true",
86
91
  onClick: handleClick,
@@ -106,7 +111,7 @@ const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick
106
111
  ' '
107
112
  ]
108
113
  }),
109
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
114
+ shouldShowModal && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
110
115
  id: "fade-menu",
111
116
  MenuListProps: {
112
117
  'aria-labelledby': 'fade-button'
package/package.json CHANGED
@@ -65,5 +65,5 @@
65
65
  "require": "./dist/index.js"
66
66
  }
67
67
  },
68
- "version": "0.2.94"
68
+ "version": "0.2.96"
69
69
  }