question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[design-system] Support error|success|warning|info by default in color prop

See original GitHub issue
  • 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;
  }
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

5reactions
oliviertassinaricommented, Apr 2, 2021

It seems that we have a working POC in https://github.com/mui-org/material-ui/issues/24778#issuecomment-774627820 and we have a product direction agreement. I’m changing the label 😃

2reactions
siriwatknpcommented, Jun 10, 2021

@oliviertassinari @mnajdova What do you think about,

  1. fix all the type issue for the components already support all color palette (eg. Chip, Badge, …a lot more).
  2. improve some component to support all color palette (eg. Fab)
  3. work on color extension suggested by this comment

For 1 and 2, we can start separately now since (1) is bug fix and (2) is enhancement. For 3, wait for someone to pick up or we can work on this in v5 beta? (is it a breaking change?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

success|warning|info by default in color prop · Issue #24778 ...
I was under the impression we already support in @material-ui/core@5.0.0-alpha.24 . If it's not working , can you share a reproducible example?
Read more >
Color in UI - Carbon Design System
Carbon's default themes are derived from the IBM Design Language color palette. The neutral gray family is dominant in the default themes, making...
Read more >
Defining Colors in your Design System - UX Collective
Semantic Colors. These are the colors that communicate purpose. They help users convey messages. For example, Green has a positive connotation.
Read more >
Design Tokens - Lightning Design System
Design tokens are the visual design atoms of the design system ... Token Support Legend: ... Generic colors to use within a Salesforce...
Read more >
Color | Interface guidelines - Primer Design System
Design tokens are a layer of abstraction that allows better maintainability, consistency and easy theming. For example use bg-default for the background of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found