Comments (3)
Note as a work around I was able to work around the issue with the following:
<Checkbox checked={checked} checkedIcon={<CheckBox color={'inherit'} />} onChange={checkboxClicked} />
from material-ui.
@amutsch It's because the color has higher specificity when it's on SvgIcon, since the component quite generic I suggest you set the default color on Checkbox
instead and keep SvgIcon's default color: inherit
:
const theme = createTheme({
// palette: { ... }
components: {
MuiCheckbox: {
defaultProps: {
color: 'secondary',
},
},
},
});
from material-ui.
@mj12albert That doesn't feel right, Theme defaults shouldn't take precedence over a passed in color, if checkbox is using svg under the hood it should pass the color through and override. Most of the system I'm building using secondary color Icons hence the default on SVG. The fact that setting the svg color in the theme breaks everything color related for checkbox definitely feels like a defect. Disabled state, color override, Likely breaks other components I haven't used yet as well then that render and svg
from material-ui.
Related Issues (20)
- [docs] Random Unsplash photo URL is no longer functional HOT 2
- sx prop not work HOT 1
- [v6] Module not found: DefaultPropsProvider/ InitColorSchemeScript HOT 9
- [joy-ui] When using styled('div') all its properties are lost
- bug: Preact example is throwing errors HOT 2
- [material-ui][Autocomplete] label cut off when the option list is displayed above.
- @mui/material: incorrect responsiveFontSizes return type when using CssVarsTheme as input HOT 2
- [RFC][Grid v2] Stabilize API HOT 4
- [docs][Grid v2] Restructure docs HOT 3
- Some bad ts performance cases
- Mui input base text area style is not applied correctly with input props on 5.15.11 from 5.15.10 HOT 6
- [Joy UI] Typography color is not defined by what is on the table
- Autocomplete with groups throws accessibility scanner issues
- Opening the Scroll Dialogs diables scrolling on main page
- Type conflict in Button component's `href` prop when using `component` prop
- Not able to upload a file on button click HOT 1
- Menu doesnt restore the aria-hidden when closed. HOT 1
- [bug] `extendTheme` doesn't work w/ `pigment` HOT 6
- [Unstable_NumberInput]: step incorrect with min HOT 3
- I have too many style tags in my head tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.