andreypopp/react-css-components

Allow className prop to apply classes to components

Liggi opened this issue · 5 comments

Liggi commented

At the moment, if you import a component from your CSS, using the className prop to pass global classes in doesn't seem to work.

Is there a way to make these carry through to the underlying markup to allow things like global layout classes?

Yes, I did that intentionally because I wanted those components to be isolated from global styling.

If I'd change that I'd rather allow extraClassName prop to set a global CSS class name rather than className. That would make an intention explicit and won't make one set className by mistake by passing all props via {...props} syntax.

Up to make a pull request?

Liggi commented

Sure! I'll probably get some time to tackle this next week.

Is it okay if I make a PR for this issue ?

@aymericbouzy one thing is that it's probably better to call it className (my prev. suggestion to use extraClassName doesn't look good I think).