I am getting below error . can you please help me to resolve below error. I am using react typescript Material UI . I am trying to customise button using below link
Type '"contained" | "outlined" | "text" | "error"' is not assignable to type '"contained" | "outlined" | "text" | undefined'.
Type '"error"' is not assignable to type '"contained" | "outlined" | "text" | undefined'.ts(2322)
CodePudding user response:
variant props accepts only values from '"contained" | "outlined" | "text" | undefined'
.
remove error: "error"
from your ButtonVariantsMapper and it should work fine.