如何正确更改样式 MUI
How to change styles correctly MUI
enter image description here
我想在这里添加样式背景
MuiAccordion: {
styleOverrides: {
root: {
boxShadow: 'none',
position: 'inherit',
'& .Mui-expanded': {
background: 'rgba(196, 199, 208, 0.2)',
},
},
},
},
但是我在别的地方添加了
enter image description here
请告诉我哪里出了问题
你可以试试去掉'&.Mui-expanded'中的space,这样就变成了'&.Mui-expanded'
MuiAccordion: {
styleOverrides: {
root: {
boxShadow: 'none',
position: 'inherit',
'&.Mui-expanded': {
background: 'rgba(196, 199, 208, 0.2)',
},
},
},
},
enter image description here
我想在这里添加样式背景
MuiAccordion: {
styleOverrides: {
root: {
boxShadow: 'none',
position: 'inherit',
'& .Mui-expanded': {
background: 'rgba(196, 199, 208, 0.2)',
},
},
},
},
但是我在别的地方添加了
enter image description here
请告诉我哪里出了问题
你可以试试去掉'&.Mui-expanded'中的space,这样就变成了'&.Mui-expanded'
MuiAccordion: {
styleOverrides: {
root: {
boxShadow: 'none',
position: 'inherit',
'&.Mui-expanded': {
background: 'rgba(196, 199, 208, 0.2)',
},
},
},
},