fix: jsx type for icons in vue 3 (#1617)

This commit is contained in:
Sun Xiaoran
2023-10-23 14:24:05 -05:00
committed by GitHub
parent 47998b05aa
commit 3d0c8691c9

View File

@@ -24,7 +24,7 @@ const TYPES_FILE = 'lucide-vue-next.d.ts';
// Generates header of d.ts file include some types and functions // Generates header of d.ts file include some types and functions
let declarationFileContent = `\ let declarationFileContent = `\
import { SVGAttributes, FunctionalComponent } from 'vue'; import { SVGAttributes, DefineComponent } from 'vue';
declare module 'lucide-vue-next' declare module 'lucide-vue-next'
// Create interface extending SVGAttributes // Create interface extending SVGAttributes
@@ -34,7 +34,7 @@ export interface SVGProps extends Partial<SVGAttributes> {
absoluteStrokeWidth?: boolean absoluteStrokeWidth?: boolean
} }
export type Icon = (props: SVGProps) => FunctionalComponent<SVGProps> export type Icon = DefineComponent<SVGProps>
// Generated icons // Generated icons
`; `;