File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import * as styledComponents from 'styled-components' ;
2
2
3
- import theme , { ThemeInterface } from './theme' ;
3
+ import { ThemeInterface } from './theme' ;
4
4
5
5
export type StyledFunction < T > = styledComponents . ThemedStyledFunction < T , ThemeInterface > ;
6
6
@@ -24,23 +24,23 @@ const {
24
24
export const media = {
25
25
lessThan ( breakpoint ) {
26
26
return ( ...args ) => css `
27
- @media (max-width: ${ theme . breakpoints [ breakpoint ] } ) {
27
+ @media (max-width: ${ props => props . theme . breakpoints [ breakpoint ] } ) {
28
28
${ ( css as any ) ( ...args ) } ;
29
29
}
30
30
` ;
31
31
} ,
32
32
33
33
greaterThan ( breakpoint ) {
34
34
return ( ...args ) => css `
35
- @media (min-width: ${ theme . breakpoints [ breakpoint ] } ) {
35
+ @media (min-width: ${ props => props . theme . breakpoints [ breakpoint ] } ) {
36
36
${ ( css as any ) ( ...args ) } ;
37
37
}
38
38
` ;
39
39
} ,
40
40
41
41
between ( firstBreakpoint , secondBreakpoint ) {
42
42
return ( ...args ) => css `
43
- @media (min-width: ${ theme . breakpoints [ firstBreakpoint ] } ) and (max-width: ${ theme . breakpoints [
43
+ @media (min-width: ${ props => props . theme . breakpoints [ firstBreakpoint ] } ) and (max-width: ${ props => props . theme . breakpoints [
44
44
secondBreakpoint
45
45
] } ) {
46
46
${ ( css as any ) ( ...args ) } ;
You can’t perform that action at this time.
0 commit comments