[TypeScript] Cannot override TextField variant with custom theme #32659
Labels
component: text field
This is the name of the generic UI component, not the React module!
typescript
Duplicates
Latest version
Current behavior 😯
When creating a custom theme with a variant for the
TextField
default props, TypeScript refuses to compile:The error is:
Expected behavior 🤔
Being able to override the variant without error
Steps to reproduce 🕹
Open the following URL on the TypeScript playground:
https://www.typescriptlang.org/play?ts=4.6.2&ssl=13&ssc=32&pln=1&pc=1#code/JYWwDg9gTgLgBAbzgYygUwIYzQFQBZohpwC+cAZlBCHAOQACIArsAPQhZpTAYA2tAKAHIIAOwDO8GASJw4AXkQC5I8GLSiY4gFxK5+gLIscaAB4wAYsDS8AJroTL9zubbTkMTXjAAKVMDp6LsFyAG4Y3BiaurTkwLy8aLa0ADROIaRpwSRZciQCJADcQiIS8OQQEAoo6Jz4hGgAFNINAJSFQA
Context 🔦
I want to allow global variant override of text fields via theme in react-admin
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: