Skip to content

Instantly share code, notes, and snippets.

@pedronauck
Created April 24, 2018 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedronauck/a0159d1246df56c69a3596d71016d650 to your computer and use it in GitHub Desktop.
Save pedronauck/a0159d1246df56c69a3596d71016d650 to your computer and use it in GitHub Desktop.
lib to add responsive css-in-js
import styled from 'react-emotion'
import { rescss } from 'rescss'
const mq = resprops([
'@media(min-width: 420px)',
'@media(min-width: 920px)',
'@media(min-width: 1120px)'
])
const Text = styled('div')`
font-size: ${mq('10px', '14px', '18px')};
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment