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

Error color for buttons, chips and possibly other components #16878

Closed
1 task done
alirezamirian opened this issue Aug 4, 2019 · 1 comment
Closed
1 task done

Error color for buttons, chips and possibly other components #16878

alirezamirian opened this issue Aug 4, 2019 · 1 comment
Labels
component: button This is the name of the generic UI component, not the React module! customization: theme Centered around the theming features duplicate This issue or pull request already exists
Milestone

Comments

@alirezamirian
Copy link
Contributor

alirezamirian commented Aug 4, 2019

It's so typical and common use case for buttons (and some other components like Chip) to have error (so-called danger) color and MUI theme supports error color. I'm wondering why this is not supported.
I couldn't find anything in Material Design docs that deprecate the use of error color for buttons, and other implementations like @angular/material also support it.
I shouldn't be the first one to bring this up for sure, but I couldn't find any issue or anything in docs about this.

  • I have searched the issues of this repository and it seems that this is not a duplicate.

Summary 💡

color prop in Button and Chip should support error too.

Right now, one solution is to create a custom button which renders a theme in which the primary color is changed to error color and render a button with primary color. This is a lot of work. A lot of hack, in fact!

Examples 🌈

<Button color="error">Delete everything in the world!</Button>

Motivation 🔦

For Button: Buttons for dangerous actions usually have error color
For Chip: One use case is when it's used along with a text input to add a list of things and the user might enter an invalid input and the corresponding chip should have error state to communicate it.

@oliviertassinari oliviertassinari added this to the v5 milestone Aug 4, 2019
@eps1lon
Copy link
Member

eps1lon commented Aug 5, 2019

Closing in favor of #13875

@eps1lon eps1lon closed this as completed Aug 5, 2019
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2022
@zannager zannager added duplicate This issue or pull request already exists component: button This is the name of the generic UI component, not the React module! labels Dec 20, 2022
@zannager zannager added customization: theme Centered around the theming features and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! customization: theme Centered around the theming features duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants