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

Chip component cannot turn on Dark theme with ThemeProvider #22370

Closed
ytliuSVN opened this issue Aug 26, 2020 · 2 comments
Closed

Chip component cannot turn on Dark theme with ThemeProvider #22370

ytliuSVN opened this issue Aug 26, 2020 · 2 comments
Labels
component: chip This is the name of the generic UI component, not the React module! support: Stack Overflow Please ask the community on Stack Overflow

Comments

@ytliuSVN
Copy link

ytliuSVN commented Aug 26, 2020

Accessibility issue with Chip component in dark mode.
Runnable snippet: CodeSandbox

Current Behavior 😯

There are three Chip values (default, primary, and secondary) that can be applied to the color attribute.
When enabling dark mode, we expect primary and secondary Chips will update its background-color.
I tried to use ThemeProvider to change the theme type but to no avail. Only the default color of Chip can be applied with dark/light mode.

light mode

Screenshot from 2020-08-27 15-23-00

dark mode

Screenshot from 2020-08-27 15-22-45

Expected Behavior 🤔

Here is the official example:

light mode

Screenshot from 2020-08-27 15-12-06

dark mode

Screenshot from 2020-08-27 15-12-24

@ytliuSVN ytliuSVN added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 26, 2020
@eps1lon eps1lon added support: Stack Overflow Please ask the community on Stack Overflow and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 26, 2020
@support
Copy link

support bot commented Aug 26, 2020

👋 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@support support bot closed this as completed Aug 26, 2020
@oliviertassinari oliviertassinari added the component: chip This is the name of the generic UI component, not the React module! label Aug 26, 2020
@ytliuSVN ytliuSVN changed the title <Chip /> cannot turn on Dark theme with ThemeProvider Chip component cannot turn on Dark theme with ThemeProvider Aug 27, 2020
@oliviertassinari
Copy link
Member

@ytliuSVN Sorry for the confusion the documentation can introduce. See #18776 to solve the underlying problem. This will be required so we can have the documentation use the default values of the theme for the demos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: chip This is the name of the generic UI component, not the React module! support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

3 participants