0
0
Fork 0

Fix missing icon props (#27539)

This commit is contained in:
Renaud Chaput 2023-10-24 22:43:06 +02:00 committed by GitHub
parent bc3afb6311
commit f08ca3f042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -25,7 +25,9 @@ export const Icon: React.FC<Props> = ({
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!IconComponent) {
if (process.env.NODE_ENV !== 'production') {
throw new Error(`<Icon id="${id}"> is missing an "icon" prop.`);
throw new Error(
`<Icon id="${id}" className="${className}"> is missing an "icon" prop.`,
);
}
IconComponent = CheckBoxOutlineBlankIcon;