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

[ToggleButtonGroup] Add variant prop for consistency with Button/ButtonGroup #35651

Closed
2 tasks done
beaniebag opened this issue Dec 28, 2022 · 3 comments
Closed
2 tasks done
Labels
component: toggle button This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)

Comments

@beaniebag
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

variant prop added to at minimum support "outlined" | "contained" options when selected

Examples 🌈

ButtonGroup and Button have this feature

Motivation 🔦

Consistency within my application. Majority of my buttons use "contained" variant. By default this button is outlined and clashes with desired design.

@beaniebag beaniebag added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 28, 2022
@ZeeshanTamboli ZeeshanTamboli added the component: toggle button This is the name of the generic UI component, not the React module! label Dec 28, 2022
@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Dec 28, 2022

@oliviertassinari Should we mark this as a "new feature" or "out of scope" since it can be customized as said in #23446?

@ZeeshanTamboli ZeeshanTamboli removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 28, 2022
@hbjORbj hbjORbj added the out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) label Dec 28, 2022
@hbjORbj
Copy link
Member

hbjORbj commented Dec 28, 2022

Duplicate of #23446

We suggest you to simply customise the component. More explanation: #23446 (comment)

@hbjORbj hbjORbj added the duplicate This issue or pull request already exists label Dec 28, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
@beaniebag
Copy link
Author

Thanks. Thought I did click the New Feature option when creating this issue.
For anyone in the future that want's the toggle button to be contained when selected. This was the styling I used:

const ContainedPrimaryToggleButton = styled(ToggleButton)(({ theme }) => ({
color: theme.palette.primary.main,
"&.Mui-selected": {
color: "white",
backgroundColor: theme.palette.primary.main,
},
"&.Mui-selected:hover": {
backgroundColor: theme.palette.primary.dark,
},
}));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toggle button This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)
Projects
None yet
Development

No branches or pull requests

3 participants