Closed
Description
I am making a component that forwards prop types to material UI components. When doing this with TextField I get complaints about "variant" type being incompatable.
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Error is given in typescript
Expected Behavior 🤔
Would expect no error and it to function in the same way as with other components such as Typography
Steps to Reproduce 🕹
https://codesandbox.io/s/material-ui-typescript-wierdness-yk119
Context 🔦
I have made custom formik inputs. In these instances props such as error, helperText etc. are set by formik hence I want to omit them to prevent intelisense suggesting them as valid props on my fields.
Your Environment 🌎
See codesandbox for more details
Tech | Version |
---|---|
Material-UI | v4.9.1 |
React | 16.12.0 |
Browser | |
TypeScript | 3.7.4 |
etc. |