Next.js Discord

Discord Forum

scss with css modules

Answered
gin posted this in #help-forum
Open in Discord
Avatar
ginOP
Hey guys, i would like to know how i can reference nested classes.
Example i have a .button class and inside that i have &.active
tsx -> styles.button active
Answered by gin
this worked for me=
<div className={`${styles.button} ${styles.active}`}>
                            Home
                        </div>
View full answer

4 Replies

Prolly checkout this ^
Avatar
ginOP
this worked for me=
<div className={`${styles.button} ${styles.active}`}>
                            Home
                        </div>
Answer
Avatar
ginOP
the nested class gets exported aswell