New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow replacing of previous class names #18
Comments
👍 on this. |
As long as there isn't a negative performance impact, I think this is a reasonable change to the API. |
I personally don't think de duplication is the responsibility of this library, given it is entirely a user input problem. |
Can someone put forward the use-case that is driving this requirement? (I mean big picture, not simple example) Looking at the complexity of implementation I'm inclined to agree with @dcousens |
So my use case is that a React component which uses this library to allow class name overwrites w/ a specific set of default classNames, so something like Conceptually since this library allows a chaining/combining a set of class names, specifying |
I agree with @dcousens but I also have 2 compelling reasons for adding this in anyway:
|
@cezar-berea We're having some discussion in the PR itself. @JedWatson mentioned exposing |
@JedWatson what is your conclusion here, |
can someone get that merged? |
@3den will land it this weekend. |
@JedWatson as |
Closing this in favour of #31 |
Just released 2.1.0 with this included. |
My use case is something like
classNames('foo', { foo: false, bar: true })
should render outclass="bar"
instead ofclass="foo bar"
. Should this be supported by the library or is this out of scope? I'd be glad to submit a PR if this use case is something you guys plan to support.The text was updated successfully, but these errors were encountered: