File tree Expand file tree Collapse file tree 4 files changed +12
-14
lines changed
Expand file tree Collapse file tree 4 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import flatten from "./flatten";
44
55export default (
66 strings : TemplateStringsArray ,
7- // note: work-a-round -> tslint is expecting trailing comma here but this is a bug
8- // tslint:disable-next-line:trailing-comma
97 ...interpolations : SimpleInterpolation [ ]
108) : string => {
119 return flatten ( css ( strings , ...interpolations ) ) ;
Original file line number Diff line number Diff line change @@ -7,18 +7,19 @@ export default (
77 theme ?: Theme ,
88) : BreakpointValuesMap | null => {
99 if ( source != null ) {
10- const destination : BreakpointValuesMap = { } ;
10+ return Object . keys ( source ) . reduce < BreakpointValuesMap > (
11+ ( destination , propertyKey ) => {
12+ const values = prepare ( source [ propertyKey ] , theme ) ;
1113
12- Object . keys ( source ) . forEach ( ( propertyKey ) => {
13- const values = prepare ( source [ propertyKey ] , theme ) ;
14+ Object . keys ( values ) . forEach ( ( breakpointKey ) => {
15+ destination [ breakpointKey ] = destination [ breakpointKey ] || { } ;
16+ destination [ breakpointKey ] [ propertyKey ] = values [ breakpointKey ] ;
17+ } ) ;
1418
15- Object . keys ( values ) . forEach ( ( breakpointKey ) => {
16- destination [ breakpointKey ] = destination [ breakpointKey ] || { } ;
17- destination [ breakpointKey ] [ propertyKey ] = values [ breakpointKey ] ;
18- } ) ;
19- } ) ;
20-
21- return destination ;
19+ return destination ;
20+ } ,
21+ { } ,
22+ ) ;
2223 }
2324
2425 return null ;
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import _css from "./css";
55export default ( breakpoints : BreakpointMap , key : string ) => {
66 return (
77 strings : TemplateStringsArray ,
8- // note: work-a-round -> tslint is expecting trailing comma here but this is a bug
9- // tslint:disable-next-line:trailing-comma
108 ...interpolations : SimpleInterpolation [ ]
119 ) : string => {
1210 const minWidth = breakpoints [ key ] ;
Original file line number Diff line number Diff line change 3636 "trailing-comma" : [
3737 true ,
3838 {
39+ "esSpecCompliant" : true ,
3940 "multiline" : " always" ,
4041 "singleline" : " never"
4142 }
You can’t perform that action at this time.
0 commit comments