Skip to content
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

[ButtonGroup] Allow override of the classname prop #19225

Closed
2 tasks done
yipei1028 opened this issue Jan 14, 2020 · 2 comments
Closed
2 tasks done

[ButtonGroup] Allow override of the classname prop #19225

yipei1028 opened this issue Jan 14, 2020 · 2 comments
Labels
support: Stack Overflow Please ask the community on Stack Overflow

Comments

@yipei1028
Copy link

yipei1028 commented Jan 14, 2020

ButtonGroup doesn't provide the functionality to override the look of children.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.
    (Not 100% same but here comes a similar one as following: #16918, #16876)

Summary 💡

Should be able to be override the style by either

i. Using grouped property in

<ButtonGroup
        classes={{
          root: styles.menuCtrlBtn,
          grouped: styles.menuCtrlBtn
        }}
>

ii. Using className in children elements

<Button className={styles.menuCtrlBtn}>

Examples 🌈

My codesandbox: fancy-grouped-button

Motivation 🔦

Screen Shot 2020-01-14 at 5 25 55 PM

@oliviertassinari oliviertassinari added the support: Stack Overflow Please ask the community on Stack Overflow label Jan 14, 2020
@support
Copy link

support bot commented Jan 14, 2020

👋 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@support support bot closed this as completed Jan 14, 2020
@oliviertassinari
Copy link
Member

See: https://material-ui.com/guides/interoperability/#css-modules. You need to get the CSS injection order right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

2 participants