File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
packages/material-ui/src/styles Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 11import { Breakpoints } from './createBreakpoints' ;
22import { Spacing } from './createSpacing' ;
3- import * as React from 'react ' ;
3+ import { CSSProperties } from './withStyles ' ;
44
55export interface Mixins {
6- gutters : ( styles ?: React . CSSProperties ) => React . CSSProperties ;
7- toolbar : React . CSSProperties ;
6+ gutters : ( styles ?: CSSProperties ) => CSSProperties ;
7+ toolbar : CSSProperties ;
88 // ... use interface declaration merging to add custom mixins
99}
1010
Original file line number Diff line number Diff line change 1+ import { createMuiTheme , makeStyles } from '@material-ui/core/styles' ;
2+
3+ {
4+ const theme = createMuiTheme ( {
5+ mixins : {
6+ toolbar : {
7+ background : '#fff' ,
8+ minHeight : 36 ,
9+ '@media (min-width:0px) and (orientation: landscape)' : {
10+ minHeight : 24
11+ } ,
12+ '@media (min-width:600px)' : {
13+ minHeight : 48
14+ }
15+ } ,
16+ }
17+ } ) ;
18+
19+ const useStyles = makeStyles ( theme => ( {
20+ appBarSpacer : theme . mixins . toolbar ,
21+ toolbarIcon : {
22+ display : 'flex' ,
23+ alignItems : 'center' ,
24+ justifyContent : 'flex-end' ,
25+ padding : '0 8px' ,
26+ ...theme . mixins . toolbar ,
27+ } ,
28+ } ) ) ;
29+ }
You can’t perform that action at this time.
0 commit comments