Use a Sass loader
Closed this issue · 3 comments
Currently all styles are defined with components as StyleSheet.create
. Some later styling might get more complex and defining them in separate files would help organize things better. Components can incorporate sibling .scss
files with matching names (e.g. ThemeSelect.scss
).
This solution should also work with react-native as we want everything to share the same codebase.
This looks like it'll work out: https://github.com/sabeurthabti/react-native-css
Hmm... looks like that will only generate us .js files from css which we'd then have to check in anyway (unless I'm missing something). I'd like to have a webpack loader so we can do import styles from './ThemeSelect.scss'
Something like this: https://github.com/thewei/react-native-css-loader
Maybe we don't even need a loader? What do you think about just separating the StyleSheet declarations into something like ThemeSelectStyles.js
which would just export the StyleSheet object?