I have a lot of components which bring in styles as props. Simple stuff like:
import { CSSProperties } from '@material-ui/styles/withStyles' // importing from mui v4 because I don't know how to do so from v5 paths
import { styled } from '@mui/material'
const StyledDiv = styled('div')(({ theme, customStyles }: StyledDivType) => ({
color: theme.palette.text.primary,
...customStyles
}))
export const MyComponent = (customStyles: CSSProperties) => (
<StyledDiv customStyles={customStyles}>My component</StyledDiv>
)
// Usage:
const App = () => (
<MyComponent customStyles={{ padding: 10, backgroundColor: 'blue' }}/>
)
The thing is, for typing purposes, I cannot find the right place to import the CSSProperties type from MUI v5. Where would be the proper place to import that so I can remove all MUI v4 import paths?
Thanks!