0

Is it possible to pass an isolated className to a custom component using CSS Modules, so I can use it inside this component?

<CustomComponent className={style.foo}/>
2
  • 1
    What does not work? Provided that you apply the className in your component template, it should work. If not, please make sure to provide a minimal reproducible example. Commented Nov 19, 2022 at 2:17
  • What is the expected behaviour? Provided you setup everything correctly this should work. How does your import statement look (the one you are getting style variable from)? How does the CSS file you are importing look? What is your loader and what configuration does it have? Please provide additional details. Commented Nov 27, 2022 at 17:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.