[design-system] Support error|success|warning|info by default in color prop
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
It already supported out of box in V5.
https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Button/Button.js#L137
https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Button/Button.js#L116
https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Button/Button.js#L116
User could add it to theme via interface merge, but it would be nice to add it in core
declare module '@material-ui/core/Button' {
interface ButtonPropsColorOverrides {
error: true;
info: true;
success: true;
warning: true;
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Button implementation at packages/material-ui/src/Button/Button.js, especially the linked color handling and the current type declarations. Verify how the existing color values are defined and identify the related tests or type checks before making the change; done means error, success, warning, and info work without module augmentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100