Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace keyof ReactSVG with SVGElementType #2668

Merged
merged 11 commits into from
Jan 18, 2025
2 changes: 0 additions & 2 deletions packages/lucide-react-native/src/createLucideIcon.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {
forwardRef,
createElement,
ReactSVG,
FunctionComponent,
ForwardRefExoticComponent,
} from 'react';
import * as NativeSvg from 'react-native-svg';
import defaultAttributes, { childDefaultAttributes } from './defaultAttributes';
Expand Down
4 changes: 2 additions & 2 deletions packages/lucide-react-native/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ForwardRefExoticComponent, ReactSVG } from 'react';
import type { ForwardRefExoticComponent, SVGElementType } from 'react';
import type { SvgProps } from 'react-native-svg';
aslilac marked this conversation as resolved.
Show resolved Hide resolved

export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][];
export type IconNode = [elementName: SVGElementType, attrs: Record<string, string>][];

aslilac marked this conversation as resolved.
Show resolved Hide resolved
export interface LucideProps extends SvgProps {
size?: string | number;
Expand Down
4 changes: 2 additions & 2 deletions packages/lucide-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactSVG, SVGProps, ForwardRefExoticComponent, RefAttributes } from 'react';
import type { SVGElementType, SVGProps, ForwardRefExoticComponent, RefAttributes } from 'react';

aslilac marked this conversation as resolved.
Show resolved Hide resolved
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][];
export type IconNode = [elementName: SVGElementType, attrs: Record<string, string>][];

ericfennis marked this conversation as resolved.
Show resolved Hide resolved
export type SVGAttributes = Partial<SVGProps<SVGSVGElement>>;
type ElementAttributes = RefAttributes<SVGSVGElement> & SVGAttributes;
Expand Down
Loading