From 1e99499dc8d18aa8e9a620c6d1a5a9d7e2076616 Mon Sep 17 00:00:00 2001 From: Ishan <66240773+D3OXY@users.noreply.github.com> Date: Thu, 20 Jul 2023 00:46:33 +0530 Subject: [PATCH] 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 * Update createLucideIcon.ts In needs RefAttributes for Forward Ref * Update createLucideIcon.ts * Update createLucideIcon.ts cleanup --------- Co-authored-by: Eric Fennis --- packages/lucide-react/src/createLucideIcon.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/lucide-react/src/createLucideIcon.ts b/packages/lucide-react/src/createLucideIcon.ts index f0e4258ea..e8e03493d 100644 --- a/packages/lucide-react/src/createLucideIcon.ts +++ b/packages/lucide-react/src/createLucideIcon.ts @@ -4,13 +4,14 @@ import defaultAttributes from './defaultAttributes'; export type IconNode = [elementName: keyof ReactSVG, attrs: Record][] export type SVGAttributes = Partial> +type ComponentAttributes = RefAttributes & SVGAttributes -export interface LucideProps extends SVGAttributes { +export interface LucideProps extends ComponentAttributes { size?: string | number absoluteStrokeWidth?: boolean } -export type LucideIcon = ForwardRefExoticComponent> +export type LucideIcon = ForwardRefExoticComponent; /** * Converts string to KebabCase * Copied from scripts/helper. If anyone knows how to properly import it here