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
Copy file name to clipboardExpand all lines: components/modal/index.jsx
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,14 @@ const propTypes = {
33
33
*/
34
34
children: PropTypes.node.isRequired,
35
35
/**
36
-
* Custom CSS classes for the modal's container.
36
+
* Custom CSS classes for the modal's container. This is the element with `.slds-modal__container`. Use `classNames` [API](https://github.com/JedWatson/classnames).
37
37
*/
38
38
containerClassName: PropTypes.oneOfType([
39
39
PropTypes.array,
40
40
PropTypes.object,
41
41
PropTypes.string]),
42
42
/**
43
-
* Custom CSS classes for the modal's body. This is the element that has overflow rules and should be used to set a static height if desired.
43
+
* Custom CSS classes for the modal's body. This is the element that has overflow rules and should be used to set a static height if desired. Use `classNames` [API](https://github.com/JedWatson/classnames).
44
44
*/
45
45
contentClassName: PropTypes.oneOfType([
46
46
PropTypes.array,
@@ -75,13 +75,23 @@ const propTypes = {
75
75
*/
76
76
header: PropTypes.node,
77
77
/**
78
-
* Adds CSS classes to the container surrounding the modal header and the close button.
78
+
* Adds CSS classes to the container surrounding the modal header and the close button. Use `classNames` [API](https://github.com/JedWatson/classnames).
79
79
*/
80
-
headerClassName: PropTypes.node,
80
+
headerClassName: PropTypes.oneOfType([
81
+
PropTypes.array,
82
+
PropTypes.object,
83
+
PropTypes.string]),
81
84
/**
82
85
* Forces the modal to be open or closed.
83
86
*/
84
87
isOpen: PropTypes.bool.isRequired,
88
+
/**
89
+
* Custom CSS classes for the portal DOM node. This node is a direct descendant of the `body` and is the parent of `ReactModal__Overlay`. Use `classNames` [API](https://github.com/JedWatson/classnames).
90
+
*/
91
+
portalClassName: PropTypes.oneOfType([
92
+
PropTypes.array,
93
+
PropTypes.object,
94
+
PropTypes.string]),
85
95
/**
86
96
* Styles the modal as a prompt.
87
97
*/
@@ -350,6 +360,7 @@ class Modal extends React.Component {
0 commit comments