@@ -15,6 +15,8 @@ interface Props {
15
15
padding ?: 'large' | 'none' ;
16
16
margin ?: 'large' | 'default' ;
17
17
zIndex ?: number | string ;
18
+ themeOverlay ?: string ;
19
+ themeContent ?: string ;
18
20
onExit ?: ( ) => void ;
19
21
exitOnUnderlayClicked ?: boolean ;
20
22
allowEventBubbling ?: boolean ;
@@ -61,6 +63,8 @@ export default function Modal({
61
63
primaryAction,
62
64
secondaryAction,
63
65
tertiaryAction,
66
+ themeOverlay = '' ,
67
+ themeContent = '' ,
64
68
onExit
65
69
} : Props ) : ReactElement {
66
70
const renderActions = ( ) : ReactElement => {
@@ -96,7 +100,7 @@ export default function Modal({
96
100
style : CSSProperties ;
97
101
'data-testid' : string ;
98
102
} = {
99
- className : ' fixed top bottom left right bg-darken50' ,
103
+ className : ` fixed top bottom left right bg-darken50 ${ themeOverlay } ` ,
100
104
style : {
101
105
display : 'grid' ,
102
106
overflowY : 'auto' ,
@@ -122,7 +126,7 @@ export default function Modal({
122
126
onOpenAutoFocus ?: ( e ) => void ;
123
127
} = {
124
128
className : classnames (
125
- `relative ${ marginClass } ${ widthClass } bg-white round` ,
129
+ `relative ${ marginClass } ${ widthClass } bg-white round ${ themeContent } ` ,
126
130
{ 'px36 py36' : padding === 'large' }
127
131
)
128
132
} ;
@@ -223,6 +227,16 @@ Modal.propTypes = {
223
227
* z-index of the modal
224
228
*/
225
229
zIndex : PropTypes . number ,
230
+ /**
231
+ * Additional CSS classes to apply to the overlay,
232
+ * along with existing classes `fixed top bottom left right bg-darken50`
233
+ */
234
+ themeOverlay : PropTypes . string ,
235
+ /**
236
+ * Additional CSS classes to apply to the content,
237
+ * along with existing classes `relative bg-white round`
238
+ */
239
+ themeContent : PropTypes . string ,
226
240
/**
227
241
* The modal's primary action. If this is provided, an encouraging
228
242
* button will be rendered at the bottom of the modal.
0 commit comments