I am wondering how I can override the styles for MuiClockPicker
?
I discovered that using createTheme
to override the styles actually works for me, but I encountered an error from TypeScript:
TS2322: Type '{ MuiOutlinedInput: { styleOverrides: { root: { color: string; border: string; }; }; }; MuiInputLabel: { styleOverrides: { root: { color: string; backgroundColor: string; paddingRight: string; paddingLeft: string; }; }; }; ... 4 more ...; MuiClockPicker: { ...; }; }' is not assignable to type 'Components'. Object literal may only specify known properties, and 'MuiClockPicker' does not exist in type 'Components'.
Below is the code snippet:
import { createTheme } from '@mui/material/styles'
export const theme = createTheme({
...
components: {
MuiClockPicker: {
styleOverrides: {
arrowSwitcher: {
display: 'none',
},
},
},
},
})