fix(lucide-svelte): update IconProps to include all properties of Icon component (#2182)

* fix(lucide-svelte): update IconProps to include all properties of Icon component

* fix(lucide-svelte): removed custom Icon type that conflicted with Icon component type

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
Garrett Pauls
2024-06-12 10:49:21 +02:00
committed by GitHub
co-authored by Eric Fennis
parent f507644488
commit 904d74fe4a
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
export let size: number | string = 24
export let strokeWidth: number | string = 2
export let absoluteStrokeWidth: boolean = false
export let iconNode: IconNode
export let iconNode: IconNode = []
const mergeClasses = <ClassType = string | undefined | null>(
...classes: ClassType[]
+2 -3
View File
@@ -1,4 +1,3 @@
import type { SvelteComponent } from 'svelte';
import type { SVGAttributes, SvelteHTMLElements } from 'svelte/elements';
export type Attrs = SVGAttributes<SVGSVGElement>;
@@ -6,11 +5,13 @@ export type Attrs = SVGAttributes<SVGSVGElement>;
export type IconNode = [elementName: keyof SvelteHTMLElements, attrs: Attrs][];
export interface IconProps extends Attrs {
name?: string;
color?: string;
size?: number | string;
strokeWidth?: number | string;
absoluteStrokeWidth?: boolean;
class?: string;
iconNode?: IconNode;
}
export type IconEvents = {
@@ -20,5 +21,3 @@ export type IconEvents = {
export type IconSlots = {
default: {};
};
export type Icon = SvelteComponent<IconProps, IconEvents, IconSlots>;