mirror of
https://github.com/iconify/iconify.git
synced 2025-01-12 01:45:41 +00:00
Fix React icon ref element
This commit is contained in:
parent
aaa0f5dfdf
commit
258af29f7c
@ -1,4 +1,4 @@
|
||||
import type { HTMLProps, RefObject } from 'react';
|
||||
import type { HTMLProps, RefAttributes } from 'react';
|
||||
import type { IconifyIcon } from '@iconify/types';
|
||||
import type { IconifyIconCustomisations as RawIconCustomisations } from '@iconify/utils/lib/customisations';
|
||||
|
||||
@ -41,15 +41,15 @@ export interface IconifyIconProps extends IconifyIconCustomisations {
|
||||
/**
|
||||
* React component properties: generic element for Icon component, SVG for generated component
|
||||
*/
|
||||
type IconifyElementProps = HTMLProps<HTMLElement>;
|
||||
type IconifyElementProps = HTMLProps<SVGSVGElement>;
|
||||
|
||||
export type IconRef = RefObject<SVGElement>;
|
||||
export type IconRef = RefAttributes<SVGSVGElement>;
|
||||
|
||||
export interface ReactRefProp {
|
||||
ref?: IconRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix of icon properties and HTMLElement properties
|
||||
* Mix of icon properties and SVGSVGElement properties
|
||||
*/
|
||||
export type IconProps = IconifyElementProps & IconifyIconProps & ReactRefProp;
|
||||
|
Loading…
Reference in New Issue
Block a user