diff --git a/packages/lucide-svelte/src/defaultAttributes.ts b/packages/lucide-svelte/src/defaultAttributes.ts index f40a05afe..61d05a1d6 100644 --- a/packages/lucide-svelte/src/defaultAttributes.ts +++ b/packages/lucide-svelte/src/defaultAttributes.ts @@ -1,4 +1,4 @@ -import type { Attrs } from "./types"; +import type { Attrs } from './types.js'; const defaultAttributes: Attrs = { xmlns: 'http://www.w3.org/2000/svg', diff --git a/packages/lucide-svelte/src/lucide-svelte.ts b/packages/lucide-svelte/src/lucide-svelte.ts index 173f8b4bb..1c5c45707 100644 --- a/packages/lucide-svelte/src/lucide-svelte.ts +++ b/packages/lucide-svelte/src/lucide-svelte.ts @@ -2,3 +2,4 @@ export * from './icons/index.js'; export * as icons from './icons/index.js'; export * from './aliases.js'; export { default as defaultAttributes } from './defaultAttributes.js'; +export type { Icon } from './types.js'; diff --git a/packages/lucide-svelte/src/types.ts b/packages/lucide-svelte/src/types.ts index f289a905a..b5e86eb16 100644 --- a/packages/lucide-svelte/src/types.ts +++ b/packages/lucide-svelte/src/types.ts @@ -1,13 +1,24 @@ +import type { SvelteComponent } from 'svelte'; import type { SVGAttributes, SvelteHTMLElements } from 'svelte/elements'; -type SVGAttrs = SVGAttributes; +export type Attrs = SVGAttributes; -export type IconNode = [elementName: keyof SvelteHTMLElements, attrs: SVGAttrs][]; +export type IconNode = [elementName: keyof SvelteHTMLElements, attrs: Attrs][]; -export interface IconProps extends SVGAttrs { +export interface IconProps extends Attrs { color?: string; size?: number | string; strokeWidth?: number | string; absoluteStrokeWidth?: boolean; class?: string; } + +type IconEvents = { + [evt: string]: CustomEvent; +}; + +type IconSlots = { + default: {}; +}; + +export type Icon = SvelteComponent;