mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-17 14:28:25 +00:00
Update createLucideIcon.ts (#1439)
* Update createLucideIcon.ts Added Missing ref prop * Update createLucideIcon.ts * Update createLucideIcon.ts ForwardRef need RefAttributes * Update packages/lucide-react/src/createLucideIcon.ts Co-authored-by: Eric Fennis <eric.fennis@gmail.com> * Update createLucideIcon.ts In needs RefAttributes for Forward Ref * Update createLucideIcon.ts * Update createLucideIcon.ts cleanup --------- Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
@@ -4,13 +4,14 @@ import defaultAttributes from './defaultAttributes';
|
||||
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
export type SVGAttributes = Partial<SVGProps<SVGSVGElement>>
|
||||
type ComponentAttributes = RefAttributes<SVGSVGElement> & SVGAttributes
|
||||
|
||||
export interface LucideProps extends SVGAttributes {
|
||||
export interface LucideProps extends ComponentAttributes {
|
||||
size?: string | number
|
||||
absoluteStrokeWidth?: boolean
|
||||
}
|
||||
|
||||
export type LucideIcon = ForwardRefExoticComponent<LucideProps & RefAttributes<SVGSVGElement>>
|
||||
export type LucideIcon = ForwardRefExoticComponent<LucideProps>;
|
||||
/**
|
||||
* Converts string to KebabCase
|
||||
* Copied from scripts/helper. If anyone knows how to properly import it here
|
||||
|
||||
Reference in New Issue
Block a user