-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(DropdownToggle, NavbarToggler, Tooltip): Pass through cssModule to child components #483
Conversation
src/ButtonGroup.js
Outdated
@@ -35,7 +35,7 @@ const ButtonGroup = (props) => { | |||
), cssModule); | |||
|
|||
return ( | |||
<Tag {...attributes} className={classes} /> | |||
<Tag {...attributes} cssModule={cssModule} className={classes} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the default Tag
is div
, in which case the cssModules
prop would not want to be passed down
I like what you are trying to do here, and you definitely exposed a pretty large issue with the way |
Thanks for the feedback, I see exactly what you mean. I've removed the changes to ButtonGroup. The other three changes seem, less problematic, is that right? I'll give more thought to the ButtonGroup and if I come up with anything I'll let you know. |
@TheSharpieOne - on reflection, I'm not sure changing ButtonGroup was the right plan anyway. The idea was to be able to give ButtonGroup a CSS Module that would style its child components, but I think this will really be easy when webpack-contrib/css-loader#520 is resolved. Please let me know if you need anything else from me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi guys, thank you all for this fix. @TheSharpieOne when we can expect this fix in npm release? :) |
Trying to use CSS Modules proved problematic for a few of the components. These changes pass through the CSS Module to the child component when appropriate.