leesander1 / hearmenow-electron

Electron client app
MIT License
3 stars 1 forks source link

Dialer Styles #27

Closed mariots closed 7 years ago

mariots commented 7 years ago

Trying to figure out how to import styles from the dialer CSS to the dialer page components through using react and web pack.

mariots commented 7 years ago

I found a hack to fix it, it's not the most efficient way of solving the problem but it does work. Basically, we add multiple classes by adding a space in-between each one. EX: <div className={ styles.footerContent + ' ' + styles.red }>. I will continue to look for a more efficient way of going about this, but for now this does work.

mariots commented 7 years ago

Turns out, this is a huge problem in the react world. The best way I found in the time I was looking was to use https://github.com/JedWatson/classnames. This npm package allows you to conditionally add classNames to your react code.