@@ -21,9 +21,10 @@ class Layout extends React.PureComponent {
21
21
overrideClasses : PropTypes . shape ( { } ) ,
22
22
children : PropTypes . element . isRequired ,
23
23
appBarPosition : PropTypes . string ,
24
- stickyFooter : PropTypes . bool ,
25
24
appBarContent : PropTypes . element ,
26
25
appBarProps : PropTypes . shape ( { } ) ,
26
+ mainGrow : PropTypes . bool ,
27
+ stickyFooter : PropTypes . bool ,
27
28
footerContent : PropTypes . element ,
28
29
footerProps : PropTypes . shape ( { } ) ,
29
30
leftDrawerOpen : PropTypes . bool . isRequired ,
@@ -39,6 +40,7 @@ class Layout extends React.PureComponent {
39
40
rightDrawerUnder : PropTypes . bool ,
40
41
rightDrawerProps : PropTypes . shape ( { } ) ,
41
42
width : PropTypes . string ,
43
+ usingTwoRowAppBar : PropTypes . bool ,
42
44
} ;
43
45
44
46
static defaultProps = {
@@ -49,6 +51,8 @@ class Layout extends React.PureComponent {
49
51
leftDrawerUnder : false ,
50
52
rightDrawerOpen : false ,
51
53
rightDrawerUnder : false ,
54
+ mainGrow : true ,
55
+ usingTwoRowAppBar : false ,
52
56
} ;
53
57
54
58
handleLeftDrawerClose = ( ) => {
@@ -83,6 +87,7 @@ class Layout extends React.PureComponent {
83
87
appBarContent,
84
88
appBarPosition,
85
89
appBarProps,
90
+ mainGrow,
86
91
leftDrawerContent,
87
92
leftDrawerOpen,
88
93
leftDrawerType,
@@ -97,6 +102,7 @@ class Layout extends React.PureComponent {
97
102
stickyFooter,
98
103
footerProps,
99
104
width,
105
+ usingTwoRowAppBar,
100
106
} = this . props ;
101
107
102
108
// TODO change the way to overrideClasses
@@ -116,7 +122,10 @@ class Layout extends React.PureComponent {
116
122
( rightDrawerOpen && rightDrawerType === 'persistent' ) ) ;
117
123
118
124
const mainClassnames = classNames ( classes . main , {
119
- [ `${ classes . mainFixedAppBar } ` ] : appBarPosition === 'fixed' ,
125
+ [ `${ classes . mainFixedAppBar } ` ] : appBarPosition === 'fixed' && ! usingTwoRowAppBar ,
126
+ [ `${ classes . mainFixedTwoRowAppBar } ` ] : appBarPosition === 'fixed' && usingTwoRowAppBar ,
127
+ [ `${ classes . mainGrow } ` ] : mainGrow && ! usingTwoRowAppBar ,
128
+ [ `${ classes . mainGrowTwoRowAppBar } ` ] : mainGrow && usingTwoRowAppBar ,
120
129
[ `${ classes . mainStickyFooter } ` ] : stickyFooter ,
121
130
[ `${ classes . mainShift } ` ] : mainLeftShift || mainRightShift ,
122
131
[ `${ classes . mainLeftShift } ` ] : mainLeftShift ,
0 commit comments