Home > Mobile >  Typescript error when using custom palette color with Chip component in MUI v5
Typescript error when using custom palette color with Chip component in MUI v5

Time:10-28

I have a custom theme where I've added custom colors to the palette. My hope was that the color prop would work with a custom color. I tested with the Button component and it worked fine. However when I tried to do the same with the Chip component I received a TypeScript error:

TypeError: Cannot read properties of undefined (reading 'type')

You can see an example here: Codesandbox Demo

  • Related