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

[ToggleButton] Add a color prop #23755

Closed
mbrookes opened this issue Nov 28, 2020 · 3 comments · Fixed by #25390
Closed

[ToggleButton] Add a color prop #23755

mbrookes opened this issue Nov 28, 2020 · 3 comments · Fixed by #25390
Assignees
Labels
component: toggle button This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process new feature New feature or request

Comments

@mbrookes
Copy link
Member

mbrookes commented Nov 28, 2020

Summary 💡

Add a color prop to ToggleButtonGroup to allow the active button to have an alternative color

Examples 🌈

One use-case: #23754

image

(Note that this example also uses a darker color than the default for the unselected text and icons.)

Edit: It seems there's an example in the spec:

image
https://material.io/design/interaction/states.html#activated ("Active state inheritance")

However this is in contrast to the Toggle Button spec: https://material.io/components/buttons#toggle-button

Motivation 🔦

The above example needed custom styling.

@mbrookes mbrookes added new feature New feature or request component: toggle button This is the name of the generic UI component, not the React module! labels Nov 28, 2020
@mbrookes mbrookes changed the title {ToggleButton] Add a color prop [ToggleButton] Add a color prop Nov 28, 2020
@oliviertassinari oliviertassinari added the design: material This is about Material Design, please involve a visual or UX designer in the process label Nov 30, 2020
@AlfredoGJ
Copy link
Contributor

Hi guys, I'd like to address this issue... Will be making a PR in a few days.

@NehaChaudhary311
Copy link

Is there some demo version with sample code for checking this feature?

@oliviertassinari
Copy link
Member

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! design: material This is about Material Design, please involve a visual or UX designer in the process new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants