@thecb/components 11.1.4 → 11.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "11.1.4",
3
+ "version": "11.1.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -17,6 +17,7 @@ const meta = {
17
17
  hideModal: fn(),
18
18
  continueAction: fn(),
19
19
  isContinueActionDisabled: false,
20
+ isCloseActionDisabled: false,
20
21
  modalOpen: false,
21
22
  cancelButtonText: "Cancel",
22
23
  continueButtonText: "Continue",
@@ -159,6 +160,14 @@ const meta = {
159
160
  defaultValue: { summary: false }
160
161
  }
161
162
  },
163
+ isCloseActionDisabled: {
164
+ description:
165
+ "Whether the close button should be disabled, only used when `onlyCloseButton` is `true`",
166
+ table: {
167
+ type: { summary: "boolean" },
168
+ defaultValue: { summary: false }
169
+ }
170
+ },
162
171
  onlyContinueButton: {
163
172
  description: "Whether the modal should have only a continue button",
164
173
  table: {
@@ -25,6 +25,7 @@ const Modal = ({
25
25
  onExit = hideModal,
26
26
  continueAction,
27
27
  isContinueActionDisabled = false,
28
+ isCloseActionDisabled = false,
28
29
  cancelAction,
29
30
  modalOpen,
30
31
  modalHeaderText,
@@ -211,6 +212,7 @@ const Modal = ({
211
212
  variant="primary"
212
213
  text={closeButtonText}
213
214
  dataQa={closeButtonText}
215
+ disabled={isCloseActionDisabled}
214
216
  extraStyles={buttonExtraStyles}
215
217
  className="modal-close-button"
216
218
  role="button"