Last active
March 27, 2019 15:21
-
-
Save technology-amazeelabs/6d4f2581470ae730acd87dc646e69226 to your computer and use it in GitHub Desktop.
CSS-in-JS example #5
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
.base { | |
color: #fff; | |
&:hover { | |
background-color: #0074d9; | |
} | |
} | |
.primary { | |
background-color: #0074D9; | |
} | |
.warning { | |
background-color: someValueReturnedByAFunction(), | |
} |
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
import styles from './styles.css'; | |
export const MyComponent = () => ( | |
<div className={`${styles.base} ${styles.warning}`}> | |
Some content | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment