mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-13 13:48:26 +00:00
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:
co-authored by
Eric Fennis
parent
f507644488
commit
904d74fe4a
@@ -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[]
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user