I am trying to apply styling via styled components to a Material UI Tab component when it has a selected prop value of true, but I'm not having any luck. According to the Material UI API documentation, the Tab component will gain a css class when the selected prop has a true value, which it does, but none of the styling that I'm trying to apply to that css class is actually being applied.
Tab component:
const StyledTab = styled(({ ...props }) => (
<Tab {...props} classes={{ selected: "selected" }} />
))`
& .selected {
background-color: yellow;
}
`;
Application:
function StyledComponentsTab() {
return (
<div>
<StyledTab label="test" selected />
</div>
);
}