Skip to content

Instantly share code, notes, and snippets.

@technology-amazeelabs
Last active March 27, 2019 15:21
Show Gist options
  • Save technology-amazeelabs/6d4f2581470ae730acd87dc646e69226 to your computer and use it in GitHub Desktop.
Save technology-amazeelabs/6d4f2581470ae730acd87dc646e69226 to your computer and use it in GitHub Desktop.
CSS-in-JS example #5
.base {
color: #fff;
&:hover {
background-color: #0074d9;
}
}
.primary {
background-color: #0074D9;
}
.warning {
background-color: someValueReturnedByAFunction(),
}
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