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:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user