Closed giorgosavgeris closed 5 years ago
@gajus I think this is not an enhancement. It is a bug.
Is this not a duplicate of https://github.com/gajus/babel-plugin-react-css-modules/issues/44 ?
Maybe, I am not sure.
Issue #44 is open and unresolved from April 2017. Nobody will pay attention.
Issue #44 is open and unresolved from April 2017. Nobody will pay attention.
Everyone is welcome to contribute, including you.
We want to use HOCs which sent down some classnames like so:
The styleName in
withWarning.js
resolves from loader to a class name which will be passed down. Here assume the resolved className iswithWarning__warning__er3432
At
prettyText.js
the styleName resolves asprettyText__pretty__ty3342
. At the same time the component received as a propertyclassName
which previously resolvedwithWarning__warning__er3432
. Instead of merging these two classes on the final outcome, only the resolved from styleName is being used and the className from props never gets concatenated unless someone would explicitly declare theclassName
on JSX<div {...props} className={props.className} styleName='pretty' />
.Ending up with something like so: