I'm looking to customize the colors of the track for both checked and unchecked states. Currently, the track color is working for the unchecked state but defaults for the checked state:
Checked State:
https://i.stack.imgur.com/eGV4a.png
Unchecked State:
https://i.stack.imgur.com/qn1M1.png
import Switch from '@mui/material/Switch';
<Switch
sx={{
".MuiSwitch-thumb": {
backgroundColor: "#FF9528"
},
".MuiSwitch-track": {
backgroundColor: "#FF4823"
},
"& .Mui-checked": {
".MuiSwitch-thumb": {
backgroundColor: "#FF4823"
},
".MuiSwitch-track": {
backgroundColor: "#FF4823"
}
}
}}
/>