1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-26 15:25:13 +02:00

Allow passing class from preact component (#1223)

Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
This commit is contained in:
YCM Jason
2024-09-27 00:53:45 +01:00
committed by GitHub
parent ef15fcad96
commit c46a85f995

View File

@@ -15,6 +15,7 @@ const createPreactComponent = (
title, title,
children, children,
className = '', className = '',
class: cls = '',
style, style,
...rest ...rest
}: IconProps) => }: IconProps) =>
@@ -24,7 +25,7 @@ const createPreactComponent = (
...defaultAttributes[type], ...defaultAttributes[type],
width: String(size), width: String(size),
height: size, height: size,
class: [`tabler-icon`, `tabler-icon-${iconName}`, className].join(' '), class: [`tabler-icon`, `tabler-icon-${iconName}`, cls, className].join(' '),
...(type === 'filled' ...(type === 'filled'
? { ? {
fill: color, fill: color,