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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

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