@@ -5,7 +5,7 @@ import { Body, Modal as LeafyGreenModal } from '../leafygreen';
5
5
import { useScrollbars } from '../../hooks/use-scrollbars' ;
6
6
import { withStackedComponentStyles } from '../../hooks/use-stacked-component' ;
7
7
8
- const contentStyles = css ( {
8
+ const styles = css ( {
9
9
width : '600px' ,
10
10
letterSpacing : 0 ,
11
11
padding : 0 ,
@@ -15,22 +15,9 @@ const contentStyles = css({
15
15
transform : 'none' ,
16
16
} ) ;
17
17
18
- const modalFullScreenStyles = css ( {
19
- '& > div' : {
20
- paddingTop : spacing [ 600 ] ,
21
- paddingBottom : spacing [ 600 ] ,
22
- paddingLeft : spacing [ 800 ] ,
23
- paddingRight : spacing [ 800 ] ,
24
- height : '100vh' ,
25
- maxHeight : '100vh' ,
26
- } ,
27
- } ) ;
28
-
29
- const contentFullScreenStyles = css ( {
18
+ const fullScreenStyles = css ( {
30
19
width : '100%' ,
31
20
height : '100%' ,
32
- maxHeight : '100%' ,
33
- margin : 0 ,
34
21
alignSelf : 'stretch' ,
35
22
'& > div' : {
36
23
height : '100%' ,
@@ -56,16 +43,10 @@ function UnwrappedModal({
56
43
57
44
return (
58
45
< LeafyGreenModal
59
- backdropClassName = { cx (
60
- scrollbarStyles ,
61
- fullScreen && modalFullScreenStyles ,
62
- backdropClassName
63
- ) }
64
- className = { cx (
65
- contentStyles ,
66
- fullScreen && contentFullScreenStyles ,
67
- className
68
- ) }
46
+ backdropClassName = { cx ( scrollbarStyles , backdropClassName ) }
47
+ className = { cx ( styles , className , {
48
+ [ fullScreenStyles ] : fullScreen ,
49
+ } ) }
69
50
{ ...props }
70
51
>
71
52
{ /* Rendering conditionally on `open` as a workaround for LG-5601 */ }
0 commit comments