combine classes from module styles and global styles in same element?
Answered
Spectacled bear posted this in #help-forum
Spectacled bearOP
So, the Docs state the following methods of adding classes for styling in JSX:
Global styles:
Modules:
what if I want to use both for 1 component?
Global styles:
className="container"Modules:
className={styles.dashboard}what if I want to use both for 1 component?
Answered by Clown
{styles.dashboard} just returns a class's name.
You can do some string concat/interpolation:
You can do some string concat/interpolation:
{"container " + styles.dashboard}4 Replies
@Spectacled bear So, the Docs state the following methods of adding classes for styling in JSX:
Global styles:
html
className="container"
Modules:jsx
className={styles.dashboard}
what if I want to use both for 1 component?
{styles.dashboard} just returns a class's name.
You can do some string concat/interpolation:
You can do some string concat/interpolation:
{"container " + styles.dashboard}Answer
Make sure to add that space after container.
Spectacled bearOP
ah ok, thanks, imma try and reply here if any issues arise
welp thankyou very verymuch â¤ï¸ u da bomb