@unbxd-ui/unbxd-react-components 0.2.130 → 0.2.131
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.
|
@@ -56,7 +56,8 @@ ModalContent.propTypes = {
|
|
|
56
56
|
|
|
57
57
|
/** Displays a full screen modal */
|
|
58
58
|
var Modal = function Modal(props, ref) {
|
|
59
|
-
var isOpen = props.isOpen,
|
|
59
|
+
var _props$isOpen = props.isOpen,
|
|
60
|
+
isOpen = _props$isOpen === void 0 ? null : _props$isOpen,
|
|
60
61
|
onClose = props.onClose,
|
|
61
62
|
_props$isConditionalH = props.isConditionalHideEnabled,
|
|
62
63
|
isConditionalHideEnabled = _props$isConditionalH === void 0 ? false : _props$isConditionalH,
|
|
@@ -78,7 +79,9 @@ var Modal = function Modal(props, ref) {
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
(0, _react.useEffect)(function () {
|
|
81
|
-
|
|
82
|
+
if (isOpen !== null) {
|
|
83
|
+
setIsModalOpen(isOpen);
|
|
84
|
+
}
|
|
82
85
|
}, [isOpen]);
|
|
83
86
|
|
|
84
87
|
/* add methods that can be accessed via this component's ref */
|
|
@@ -114,7 +117,7 @@ Modal.propTypes = {
|
|
|
114
117
|
Modal.defaultProps = {
|
|
115
118
|
className: "",
|
|
116
119
|
title: "",
|
|
117
|
-
isOpen:
|
|
120
|
+
isOpen: null,
|
|
118
121
|
showClose: true,
|
|
119
122
|
showHeader: true,
|
|
120
123
|
isConditionalHideEnabled: false
|