Is it possible to use a props variable for a css-modules className?
// Component.js
import styles from "./Component.module.scss"
const Component = ({ color }) =>
<div className={`${styles.component}` `${styles.color}`>
Component
</div>
// Component.module.scss
.component { border: 1px black solid; }
.red { color: red; }
.green { color: green; }
Then I could use the Component like so:
// App.js
<Component color="red" />
<Component color="green" />
And have the two Components be red and green respectively.