File tree 4 files changed +596
-555
lines changed
4 files changed +596
-555
lines changed Original file line number Diff line number Diff line change 27
27
"react-dom" : " ^17.0.0"
28
28
},
29
29
"dependencies" : {
30
- "@faceless-ui/window-info" : " ^1.2.7 "
30
+ "@faceless-ui/window-info" : " ^2.0.1 "
31
31
},
32
32
"devDependencies" : {
33
33
"@trbl/eslint-config" : " ^2.0.3" ,
Original file line number Diff line number Diff line change @@ -31,18 +31,18 @@ const Cell: React.FC<Props> = (props) => {
31
31
let colsToSpan = colsAvailable ;
32
32
33
33
if ( cols && cols < colsAvailable ) colsToSpan = cols ;
34
- if ( colsXL && breakpoints . xl ) colsToSpan = colsXL ;
35
- if ( colsL && breakpoints . l ) colsToSpan = colsL ;
36
- if ( colsM && breakpoints . m ) colsToSpan = colsM ;
37
- if ( colsS && breakpoints . s ) colsToSpan = colsS ;
34
+ if ( colsXL && breakpoints ? .xl ) colsToSpan = colsXL ;
35
+ if ( colsL && breakpoints ? .l ) colsToSpan = colsL ;
36
+ if ( colsM && breakpoints ? .m ) colsToSpan = colsM ;
37
+ if ( colsS && breakpoints ? .s ) colsToSpan = colsS ;
38
38
39
39
let colToStart = 0 ;
40
40
41
41
if ( start ) colToStart = start ;
42
- if ( typeof startXL === 'number' && breakpoints . xl ) colToStart = startXL ;
43
- if ( typeof startL === 'number' && breakpoints . l ) colToStart = startL ;
44
- if ( typeof startM === 'number' && breakpoints . m ) colToStart = startM ;
45
- if ( typeof startS === 'number' && breakpoints . s ) colToStart = startS ;
42
+ if ( typeof startXL === 'number' && breakpoints ? .xl ) colToStart = startXL ;
43
+ if ( typeof startL === 'number' && breakpoints ? .l ) colToStart = startL ;
44
+ if ( typeof startM === 'number' && breakpoints ? .m ) colToStart = startM ;
45
+ if ( typeof startS === 'number' && breakpoints ? .s ) colToStart = startS ;
46
46
47
47
const gridColumnStart = colToStart || undefined ;
48
48
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ const SettingsProvider: React.FC<Props> = (props) => {
21
21
const { breakpoints } = useWindowInfo ( ) ;
22
22
23
23
let smallestBreakpointReached : 'xl' | 'l' | 'm' | 's' = 'xl' ;
24
- if ( breakpoints . l ) smallestBreakpointReached = 'l' ;
25
- if ( breakpoints . m ) smallestBreakpointReached = 'm' ;
26
- if ( breakpoints . s ) smallestBreakpointReached = 's' ;
24
+ if ( breakpoints ? .l ) smallestBreakpointReached = 'l' ;
25
+ if ( breakpoints ? .m ) smallestBreakpointReached = 'm' ;
26
+ if ( breakpoints ? .s ) smallestBreakpointReached = 's' ;
27
27
28
28
const maxColumns = cols [ smallestBreakpointReached ] ;
29
29
const activeColumnGap = colGap [ smallestBreakpointReached ] ;
You can’t perform that action at this time.
0 commit comments