diff --git a/packages/icons-preact/src/createPreactComponent.ts b/packages/icons-preact/src/createPreactComponent.ts index e98f93970..5ba4677fb 100644 --- a/packages/icons-preact/src/createPreactComponent.ts +++ b/packages/icons-preact/src/createPreactComponent.ts @@ -15,17 +15,17 @@ const createPreactComponent = ( title, children, className = '', - class: cls = '', + class: classes = '', style, ...rest }: IconProps) => h( - 'svg', + 'svg' as any, { ...defaultAttributes[type], width: String(size), - height: size, - class: [`tabler-icon`, `tabler-icon-${iconName}`, cls, className].join(' '), + height: String(size), + class: [`tabler-icon`, `tabler-icon-${iconName}`, classes, className].join(' '), ...(type === 'filled' ? { fill: color, @@ -40,7 +40,8 @@ const createPreactComponent = ( [ title && h('title', {}, title), ...iconNode.map(([tag, attrs]) => h(tag, attrs)), - ...toChildArray(children)], + ...toChildArray(children), + ], ); Component.displayName = `${iconNamePascal}`;