mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
Fix type error of preact createLucideIcon() (#1754)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
co-authored by
Eric Fennis
parent
d9d7e245a3
commit
e3166c65df
@@ -25,7 +25,7 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): FunctionCompone
|
||||
{ color = 'currentColor', size = 24, strokeWidth = 2, absoluteStrokeWidth, children, class: classes = '', ...rest }: LucideProps
|
||||
) =>
|
||||
h(
|
||||
'svg' as unknown as ComponentType<Partial<JSX.SVGAttributes<SVGElement> & { 'stroke-width': number | string }>>,
|
||||
'svg',
|
||||
{
|
||||
...defaultAttributes,
|
||||
width: String(size),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { JSX } from 'preact'
|
||||
|
||||
export default {
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
width: 24,
|
||||
@@ -8,4 +10,4 @@ export default {
|
||||
'stroke-width': '2',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
};
|
||||
} satisfies JSX.SVGAttributes;
|
||||
|
||||
Reference in New Issue
Block a user