You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(Modal): labelClose prop is now required when onClose is defined
BREAKING CHANGE: the labelClose prop no longer has a default value.
It is now required whenever onClose is defined and
hasCloseButton is not explicitly set to false (default value is true).
Copy file name to clipboardexpand all lines: packages/orbit-components/src/Modal/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Table below contains all types of the props available in the Modal component.
38
38
| hasCloseButton |`boolean`|`true`| Defines whether the Modal displays a close button. If you disable this, we recommend adding some kind of an alternative. |
39
39
| disableAnimation |`boolean`|`false`| Defines whether the Modal performs the slide in animation on mobile. If you want to improve your [CLS](https://web.dev/cls/) score, you might want to set this to `true`. |
40
40
| mobileHeader |`boolean`|`true`| If `false` the ModalHeader will not have MobileHeader and CloseContainer. |
41
-
| labelClose |`string`|`Close`| The label for the close button. |
41
+
| labelClose |`string`|| The label for the close button. It is required all the time, unless `hasCloseButton` is explicitly set to `false`.|
42
42
| onScroll |`event => void \| Promise`|| Function for handling `onScroll` event. [See Functional specs](#functional-specs). |
43
43
| ariaLabelledby |`string`|| The `aria-labelledby` attribute of the Modal. It should be used if `title` is not defined on the ModalHeader. |
44
44
| ariaDescribedby |`string`|| The `aria-describedby` attribute of the Modal. It should be used if `description` is not defined on the ModalHeader. |
0 commit comments