rem*_*acr 10
This works for version "@material-ui/core": "4.9.9"
You can use the following to be applied for the entire theme:
const theme = createMuiTheme({
overrides: {
MuiExpansionPanel: {
root: {
'&:before': {
display: 'none'
},
},
},
}
}
Run Code Online (Sandbox Code Playgroud)
Or if you need it only for one component then can be hidden through a class style:
import { makeStyles } from '@material-ui/core/styles'
....
const useStyles = makeStyles({
hideBorder: {
'&.MuiExpansionPanel-root:before': {
display: 'none',
},
},
})
....
const classes = useStyles()
.....
<ExpansionPanel className={classes.hideBorder}>
Run Code Online (Sandbox Code Playgroud)
尝试编辑类的css expansion-panel(我猜你的意思是盒子阴影,没有边框)
.expansion-panel {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
Run Code Online (Sandbox Code Playgroud)