diff --git a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts index de48af2a..e7e83fd1 100644 --- a/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts +++ b/packages/pigment-css-react/src/utils/remove-prop-types-plugin.ts @@ -13,8 +13,9 @@ export const removePropTypesPlugin = declare<{}>((api) => { const property = left.get('property'); const isPropTypes = property.isIdentifier({ name: 'propTypes' }); const isMuiName = property.isIdentifier({ name: 'muiName' }); + const isDisplayName = property.isIdentifier({ name: 'displayName' }); - if (!isPropTypes && !isMuiName) { + if (!isPropTypes && !isMuiName && !isDisplayName) { return; } const parentExpression = path.findParent((p) => p.isExpressionStatement());