Skip to content

Commit

Permalink
Update createLucideIcon.ts (#1439)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update createLucideIcon.ts

In needs RefAttributes for Forward Ref

* Update createLucideIcon.ts

* Update createLucideIcon.ts

cleanup

---------

Co-authored-by: Eric Fennis <[email protected]>
  • Loading branch information
D3OXY and ericfennis authored Jul 19, 2023
1 parent 724a43e commit 1e99499
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/lucide-react/src/createLucideIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e99499

Please sign in to comment.