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.

[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:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
itscharlieliucommented, Apr 6, 2021

Can I take this issue?

0reactions
italodeandracommented, Apr 12, 2021

Thanks for the contribution @itscharlieliu !

Read more comments on GitHub >

github_iconTop 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 >

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