mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.15k stars 32.35k forks source link

[docs][joy-ui] Change dark theme component background color without affecting other states #42547

Open hsellik opened 6 months ago

hsellik commented 6 months ago

Related page

https://mui.com/joy-ui/customization/themed-components/

Kind of issue

Missing information

Issue description

I would assume that changing backgroundColor of a Joy UI component would not override other states such as hover and use the color from the default style for these states.

It is the case observed for the light mode. See the sandbox, hover the button and the color changes. However, when trying to do the same in dark mode, it overrides other states (see sandbox).

I couldn't find out from the documentation if this is intended behavior or not and what should be done to get a similar effect for the dark mode.

Context

I am trying to apply a custom backgroundColor to a Joy UI Button component which is in dark mode. However, it also overrides all other states which I do not wish to change and changing them all manually is tedious.

Search keywords: button, component, theme, background

siriwatknp commented 3 months ago

Thanks for reporting the issue! Joy UI development is temporarily on hold as the maintainers focus on the next two major releases of Material UI