Created
March 15, 2021 15:02
-
-
Save devbyray/21f22a71d05fab4b062ee6dc2972479d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// breakpoints.{js,ts,tsx} | |
const size = { | |
xs: '320px', | |
sm: '768px', | |
lg: '1024px', | |
xl: '1200px', | |
} | |
const mediaQueries = (key: keyof typeof size) => { | |
return (style: TemplateStringsArray | String) => `@media (min-width: ${size[key]}) { ${style} }` | |
} | |
export { size, mediaQueries } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment