Currently facing a challenge in customizing material-ui themes to achieve the desired functionality.
The goal is to have the expansion panels display a different arrow color when expanded for improved visibility. However, this customization should be applied only to parent expansion panels and not nested ones.
Presently, the theme has been set up so that only parent expansion panels change color upon expansion: https://i.stack.imgur.com/rjax0.png
The issue lies in the fact that the black arrow becomes difficult to see against the dark-blue panel summary background. To address this, I aim to adjust the arrow color to white, but only within parent panels. In essence, whenever an ExpansionPanelSummary appears blue, its arrow should be white.
I have attempted to locate a CSS control element that allows me to achieve this. Below is the snippet from my theme for ExpansionPanelSummary, which manages the color (I suspect the CSS defining the arrow might be present here, though I'm uncertain):
MuiExpansionPanelSummary: {
root: {
minHeight: "0px",
minWidth: "0px",
"&$expanded": {
//Elevation 1
boxShadow:
"0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12)",
minHeight: "0px",
backgroundColor: "#3f51b5",
color: "white"
},
".MuiExpansionPanelDetails-root &$expanded": {
backgroundColor: "transparent",
color: "black"
}
},
content: {
minWidth: "0px",
margin: "8px 0px",
"&$expanded": {
margin: "8px 0px"
}
}
},
Any assistance or guiding insights on how to achieve this would be greatly appreciated.