@thecb/components 4.0.10 → 4.0.11
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.
package/dist/index.cjs.js
CHANGED
|
@@ -35203,6 +35203,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
35203
35203
|
var ModalLink = _ref.ModalLink,
|
|
35204
35204
|
hideModal = _ref.hideModal,
|
|
35205
35205
|
continueAction = _ref.continueAction,
|
|
35206
|
+
cancelAction = _ref.cancelAction,
|
|
35206
35207
|
modalOpen = _ref.modalOpen,
|
|
35207
35208
|
modalHeaderText = _ref.modalHeaderText,
|
|
35208
35209
|
modalBodyText = _ref.modalBodyText,
|
|
@@ -35220,7 +35221,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
35220
35221
|
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
35221
35222
|
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
35222
35223
|
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
35223
|
-
maxHeight = _ref.maxHeight
|
|
35224
|
+
maxHeight = _ref.maxHeight,
|
|
35225
|
+
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
35226
|
+
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi;
|
|
35224
35227
|
|
|
35225
35228
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
35226
35229
|
isMobile = _useContext.isMobile;
|
|
@@ -35237,7 +35240,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
35237
35240
|
},
|
|
35238
35241
|
dialogStyle: {
|
|
35239
35242
|
width: "615px"
|
|
35240
|
-
}
|
|
35243
|
+
},
|
|
35244
|
+
underlayClickExits: underlayClickExits
|
|
35241
35245
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
35242
35246
|
padding: "0",
|
|
35243
35247
|
borderRadius: "2px",
|
|
@@ -35276,7 +35280,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
35276
35280
|
extraStyles: isMobile ? "flex-grow: 1" : ""
|
|
35277
35281
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
35278
35282
|
variant: "secondary",
|
|
35279
|
-
action: hideModal,
|
|
35283
|
+
action: cancelAction ? cancelAction : hideModal,
|
|
35280
35284
|
text: cancelButtonText,
|
|
35281
35285
|
dataQa: cancelButtonText,
|
|
35282
35286
|
extraStyles: "width: 100%;"
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ const Modal = ({
|
|
|
24
24
|
ModalLink,
|
|
25
25
|
hideModal,
|
|
26
26
|
continueAction,
|
|
27
|
+
cancelAction,
|
|
27
28
|
modalOpen,
|
|
28
29
|
modalHeaderText,
|
|
29
30
|
modalBodyText,
|
|
@@ -34,7 +35,8 @@ const Modal = ({
|
|
|
34
35
|
useDangerButton = false,
|
|
35
36
|
defaultWrapper = true,
|
|
36
37
|
onlyCloseButton = false,
|
|
37
|
-
maxHeight
|
|
38
|
+
maxHeight,
|
|
39
|
+
underlayClickExits = true
|
|
38
40
|
}) => {
|
|
39
41
|
const { isMobile } = useContext(ThemeContext);
|
|
40
42
|
return (
|
|
@@ -54,6 +56,7 @@ const Modal = ({
|
|
|
54
56
|
dialogStyle={{
|
|
55
57
|
width: "615px"
|
|
56
58
|
}}
|
|
59
|
+
underlayClickExits={underlayClickExits}
|
|
57
60
|
>
|
|
58
61
|
<Box
|
|
59
62
|
padding="0"
|
|
@@ -95,7 +98,7 @@ const Modal = ({
|
|
|
95
98
|
>
|
|
96
99
|
<ButtonWithAction
|
|
97
100
|
variant="secondary"
|
|
98
|
-
action={hideModal}
|
|
101
|
+
action={cancelAction ? cancelAction : hideModal}
|
|
99
102
|
text={cancelButtonText}
|
|
100
103
|
dataQa={cancelButtonText}
|
|
101
104
|
extraStyles="width: 100%;"
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|