DEV Community

André Castelo
André Castelo

Posted on

Prop forwarding with Emotion, Material-UI and Material-UI-system

Material-ui-system is an awesome library, but when using with @emotion/styled there might be a few annoying warnings, complaining that you're passing an invalid property to a DOM node. Here's a quick function to prevent that:

And an example overriding an existing Material-UI component:

Discussion (0)