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