File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,16 @@ class Layout extends React.PureComponent {
71
71
// use classes insted of overrideClasses as material-ui
72
72
const classes = { ...defaultClasses , ...overrideClasses } ;
73
73
74
+ const mainShift = drawerOpen && ( drawerType === 'permanent' || drawerType === 'persistent' ) ;
74
75
const mainClassnames = classNames (
75
76
classes . main ,
76
77
{ [ `${ classes . mainFixedAppBar } ` ] : appBarPosition === 'fixed' } ,
77
78
{ [ `${ classes . mainStickyFooter } ` ] : stickyFooter } ,
79
+ { [ `${ classes . mainShift } ` ] : mainShift } ,
78
80
) ;
79
81
80
82
const appBarShift =
81
83
drawerOpen && ! drawerUnder && ( drawerType === 'permanent' || drawerType === 'persistent' ) ;
82
- console . log ( 'appBarShift' , appBarShift ) ;
83
84
84
85
const appBarClassnames = classNames ( classes . appBar , {
85
86
[ `${ classes . appBarShift } ` ] : appBarShift ,
Original file line number Diff line number Diff line change @@ -30,7 +30,15 @@ const styles = theme => ({
30
30
mainStickyFooter : {
31
31
flex : 1 ,
32
32
} ,
33
- '@media (max-width: 599px)' : {
33
+ mainShift : {
34
+ marginLeft : drawerWidth ,
35
+ width : `calc(100% - ${ drawerWidth } px)` ,
36
+ transition : theme . transitions . create ( 'margin' , {
37
+ easing : theme . transitions . easing . easeOut ,
38
+ duration : theme . transitions . duration . enteringScreen ,
39
+ } ) ,
40
+ } ,
41
+ '@media (max-width: 599px)' : { // use mixim
34
42
mainFixedAppBar : {
35
43
marginTop : '56px' ,
36
44
} ,
You can’t perform that action at this time.
0 commit comments