I have a Material UI Select
component that is on a dark background, so for just this one component I\'d like to change it so that the text and line colours are
If the goal is simply to turn the underline (and text as well), there's a very simple solution, which also works with many other components (,
, etc.):
const theme = createMuiTheme({
palette: {
type: 'dark',
},
});
It will catch the underline and turn it white.
For details on what this will change, in case you want to override elements of it: https://material-ui.com/customization/palette/#dark-mode
(If you've never used a theme before, you'll need to import createMuiTheme
and wrap your component in it; see https://material-ui.com/customization/theming/)