1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-16 11:04:18 +02:00

build fix

This commit is contained in:
codecalm
2024-09-27 22:27:41 +02:00
parent a4ac054ede
commit 35f51530f2

View File

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