Fix typescript declarations for lucide-react (#388)
* Fix typescript declarations for lucide-react - removed leftover references to `vue` - removed redundant property declarations on `LucideProps` * Update buildTypes.js Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
@@ -1,30 +1,22 @@
|
||||
import path from 'path';
|
||||
import {
|
||||
writeFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
appendFile,
|
||||
} from '../../../scripts/helpers';
|
||||
import path from "path";
|
||||
import {appendFile, readSvgDirectory, resetFile, toPascalCase, writeFile} from "../../../scripts/helpers";
|
||||
|
||||
const srcDirectory = path.join(__dirname, '../dist');
|
||||
const srcDirectory=path.join(__dirname, "../dist");
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
/// <reference types="vue" />
|
||||
import { SVGAttributes } from 'vue'
|
||||
const typeDefinitions=`\
|
||||
/// <reference types="react" />
|
||||
import { SVGAttributes } from 'react'
|
||||
|
||||
declare module 'lucide-vue-next'
|
||||
declare module 'lucide-react'
|
||||
|
||||
// Create interface extending SVGAttributes
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<React.SVGProps<SVGSVGElement>> {
|
||||
color?: string
|
||||
size?: string | number
|
||||
stroke?: string | number
|
||||
strokeWidth?: string | number
|
||||
}
|
||||
|
||||
export type Icon = React.FC<LucideProps>;
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user