This repository was archived by the owner on Nov 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed
internals/startingTemplate/src/styles Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1+ import { media , sizes } from '../media' ;
2+ import { css } from 'styled-components/macro' ;
3+
4+ describe ( 'media' , ( ) => {
5+ it ( 'should return media query in css' , ( ) => {
6+ const mediaQuery = media . small `color : red;` . join ( '' ) ;
7+ const cssVersion = css `
8+ @media (min-width : ${ sizes . small } px) {
9+ color : red;
10+ }
11+ ` . join ( '' ) ;
12+ expect ( mediaQuery ) . toEqual ( cssVersion ) ;
13+ } ) ;
14+ } ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717 */
1818
1919// Update your breakpoints if you want
20- const sizes = {
20+ export const sizes = {
2121 small : 600 ,
2222 medium : 1024 ,
2323 large : 1440 ,
Original file line number Diff line number Diff line change 1+ import { media , sizes } from '../media' ;
2+ import { css } from 'styled-components/macro' ;
3+
4+ describe ( 'media' , ( ) => {
5+ it ( 'should return media query in css' , ( ) => {
6+ const mediaQuery = media . small `color : red;` . join ( '' ) ;
7+ const cssVersion = css `
8+ @media (min-width : ${ sizes . small } px) {
9+ color : red;
10+ }
11+ ` . join ( '' ) ;
12+ expect ( mediaQuery ) . toEqual ( cssVersion ) ;
13+ } ) ;
14+ } ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717 */
1818
1919// Update your breakpoints if you want
20- const sizes = {
20+ export const sizes = {
2121 small : 600 ,
2222 medium : 1024 ,
2323 large : 1440 ,
You can’t perform that action at this time.
0 commit comments