I'm struggling to customize the appearance of child th
elements using the TableHead
component from MaterialUI. While I've been successful in modifying various properties, I'm facing difficulty in changing the hover color.
Below is the snippet of CSS that I've applied (check it out in this sandbox):
<TableHead
sx={{
"& th": {
color: "blue",
backgroundColor: "yellow"
},
"& .MuiTableSortLabel-root.Mui-active, .MuiTableSortLabel-root.Mui-active .MuiTableSortLabel-icon": {
color: "red"
}
}}
>
Additionally, if you could transform the css
selector code into a format similar to this example, that would earn you some bonus points.