I'm working on customizing the styling of a Material UI Expansion Panel, specifically to apply my theme only to the main parent panel when it is expanded, and not to any nested panels within it.
For instance:
https://i.sstatic.net/nBhcN.png
Here's the code for my theme:
const customTheme = createMuiTheme({
overrides: {
MuiExpansionPanelSummary: {
root: {
minHeight: "0px",
minWidth: "0px",
"&$expanded": {
backgroundColor: "lightblue"
}
}
}
}
});
I'm struggling to target only the parent ExpansionPanelSummary components with this style, excluding any ExpansionPanelSummary components inside another ExpansionPanel.
Take a look at this sandbox example: https://codesandbox.io/s/mui-how-to-override-tab-theme-sn6pn?fontsize=14&hidenavigation=1&theme=dark