Last active
July 4, 2019 12:24
-
-
Save Scrini/ad126a9bd885f4107c67344453fd4407 to your computer and use it in GitHub Desktop.
How organize your files of style
This file contains hidden or 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
// styles/colors.js | |
const colors = { | |
primary: '#333333' | |
}; | |
export default colors; | |
// styles/fonts.js | |
const fonts = { | |
title: 32 | |
}; | |
export default fonts; | |
// styles/metrics.js | |
const getTextMedia = (maxWidth) => { | |
return `screen and (max-width: ${maxWidth}px)`; | |
}; | |
const metrics = { | |
phone: getTextMedia(360), | |
phone: getTextMedia(360), | |
phone: getTextMedia(360), | |
phone: getTextMedia(360), | |
}; | |
export default metrics; | |
// styles/index.js | |
import colors from './colors'; | |
import fonts from './fonts'; | |
import metrics from './metrics'; | |
export { colors, fonts, metrics }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment