I have the AutoComplete component from mui in my code, and I'm using it with their TextField component like so:
<StyledAutoComplete
id="xxx"
clearOnEscape
options={[...]}
renderInput={(params) => (
<TextField {...params} label="clearOnEscape" variant="standard" />
)}
/>
Where StyledAutoComplete is the following styled component:
export const StyledAutocomplete = styled(Autocomplete)`
.MuiAutocomplete-option {
color: white;
}
.MuiAutocomplete-inputRoot {
color: white;
}
.MuiAutocomplete-clearIndicator {
color: white;
}
.MuiAutocomplete-popupIndicator {
color: white;
}
`;
This works on some styles (such as the text colour inside the input) but I don't know how I can for example style the input's label or the options' text colour (I tried with .MuiAutocomplete-option from the AutoComplete API docs but that doesn't seem to work). Any help greatly appreciated.