Yes, it’s but all the class names are assigned to standard html elements and not react components.
Can you please clarify how to handle react component’s styling in this case ?
You have to post a live example or a GitHub link to all the code.
Not sure what you mean, the output is always HTML, that is what the styles get applied to. Use the dev tools and inspect the element, make sure the styles are applied and are not overwritten by other CSS (cascade, specificity).
Also, is the Input component your own or from a component library?
What do you mean by “styling react components”, isn’t that what you’re currently doing?
Someone might correct me, but I’m pretty sure that if you have a component like this:
<Component prop={someProp} />
… and you give it a className, what exactly does get that class in the final HTML that is constructed from the JSX? You won’t find any Component in the HTML, only the HTML elements that Component consists of. So those elements are the only thing that you can style with a class, not the Component tag itself.
There’s different ways (or philosophies…) how to apply the styles and where to put them. The “classical” approach is to collect all styles in one style.css file. You could also give each component its own stylesheet and import it, or write the styles inline in the component by defining a style object, so that each component brings its own styles instead of using a “global” stylesheet. But in any case, styles can only be applied to HTML elements.