wwilsman/monopoly-wallet

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.

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?

#17 removed the dependency on react-native-web. This should be easier to implement with only the browser in mind