[LinearProgress] Add color="inherit" support
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 😯
When using the component LinearProgress with the property color
being the value inherit
, the component throws the following error:
Cannot read property 'main' of undefined
Expected Behavior 🤔
It should inherit the color from the parent component (or use the default gray colors as seen on other components).
Steps to Reproduce 🕹
https://codesandbox.io/s/material-ui-v5-linearprogress-with-colorinherit-8w0xt
Context 🔦
I want to use the LinearProgress inside a Button and need it to inherit the color from the button.
Your Environment 🌎
`npx @material-ui/envinfo`
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 15.12.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.7.6 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.423.0), Chromium (89.0.774.63) <- Browser used
npmPackages:
@emotion/react: ^11.1.5 => 11.1.5
@emotion/styled: ^11.1.5 => 11.1.5
@material-ui/core: ^5.0.0-alpha.28 => 5.0.0-alpha.28
@material-ui/styled-engine: 5.0.0-alpha.25
@material-ui/styles: 5.0.0-alpha.28
@material-ui/system: 5.0.0-alpha.28
@material-ui/types: 5.1.7
@material-ui/unstyled: 5.0.0-alpha.28
@material-ui/utils: 5.0.0-alpha.28
@types/react: ^17.0.3 => 17.0.3
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: ^4.2.3 => 4.2.3
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
[LinearProgress] Add color="inherit" support · Issue #25568
I want to use the LinearProgress inside a Button and need it to inherit the color from the button. Your Environment. `npx @material-ui/ ......
Read more >How can I change the colour of a MUI LinearProgress ...
How can I change the colour of a MUI LinearProgress component? · 1. Welcome to Stack Overflow. Please see how to ask a...
Read more >Circular, Linear progress React components - Material UI
Progress indicators inform users about the status of ongoing processes, such as loading an app, submitting a form, or saving updates. Determinate indicators ......
Read more >Creating a Custom Material UI Theme Part 3
For components such as Badges and Circular Progress, you can add color ... to add additional color options: Chips and Linear Progress.
Read more >@material-ui/core | Yarn - Package Manager
... [TextField] Add support for `minRows` (#27293) @eps1lon ... [Button] Add color inherit to outlined variant of button component (#14332) @EndiM ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can I take this issue?
Thanks for the contribution @itscharlieliu !