Open sm2017 opened 1 year ago
@mnajdova, you're more familiar with this area. Would you mind checking this?
The TextField
component does not support the dynamic variants, as the structure of the component depends on this prop - for e.g. different input component is rendered based on the variant
prop. We are tracking this issue in https://github.com/mui/material-ui/issues/22259, please upvote it.
declare module '@mui/material/TextField' { interface TextFieldPropsVariantOverrides { dashed: true; } } this module is depricated
using this example import { TextField, TextFieldProps } from "@mui/material"; interface CustomTextField {} export const CustomTextField: FC<TextFieldProps & CustomTextField> = ({ className, ...props }) => { return <TextField className={clsx(styles.root, className)} {...props} />; };
In TypeScript there is no way to add variant to TextField, there is no
TextFieldPropsVariantOverrides
orBaseTextFieldPropsVariantOverrides
Is there any temporary workaround?