@bearei/react-icon
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -7,3 +7,3 @@ import type { HandleEvent } from '@bearei/react-util/lib/event'; | ||
*/ | ||
export interface BaseIconProps<T> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
export interface BaseIconProps<T, E> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
ref?: Ref<T>; | ||
@@ -34,11 +34,11 @@ /** | ||
*/ | ||
export interface IconProps<T> extends BaseIconProps<T> { | ||
export interface IconProps<T, E> extends BaseIconProps<T, E> { | ||
/** | ||
* Render the icon main | ||
*/ | ||
renderMain?: (props: IconMainProps<T>) => ReactNode; | ||
renderMain?: (props: IconMainProps<T, E>) => ReactNode; | ||
/** | ||
* Render the icon container | ||
*/ | ||
renderContainer?: (props: IconContainerProps<T>) => ReactNode; | ||
renderContainer?: (props: IconContainerProps<T, E>) => ReactNode; | ||
} | ||
@@ -48,3 +48,3 @@ /** | ||
*/ | ||
export interface IconChildrenProps<T> extends Omit<IconProps<T>, 'renderContainer' | 'renderMain' | 'ref'> { | ||
export interface IconChildrenProps<T, E> extends Omit<IconProps<T, E>, 'renderContainer' | 'renderMain' | 'ref'> { | ||
/** | ||
@@ -60,5 +60,5 @@ * The unique ID of the component | ||
} | ||
export declare type IconMainProps<T> = IconChildrenProps<T>; | ||
export declare type IconContainerProps<T> = Pick<IconProps<T>, 'ref'> & IconChildrenProps<T>; | ||
declare function Icon<T>({ ref, renderMain, renderContainer, ...props }: IconProps<T>): JSX.Element; | ||
export declare type IconMainProps<T, E> = IconChildrenProps<T, E>; | ||
export declare type IconContainerProps<T, E> = Pick<IconProps<T, E>, 'ref'> & IconChildrenProps<T, E>; | ||
declare function Icon<T, E = React.MouseEvent<T, MouseEvent>>({ ref, renderMain, renderContainer, ...props }: IconProps<T, E>): JSX.Element; | ||
export default Icon; |
@@ -7,3 +7,3 @@ import type { HandleEvent } from '@bearei/react-util/lib/event'; | ||
*/ | ||
export interface BaseIconProps<T> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
export interface BaseIconProps<T, E> extends Omit<DetailedHTMLProps<HTMLAttributes<T>, T> & ViewProps, ''> { | ||
ref?: Ref<T>; | ||
@@ -34,11 +34,11 @@ /** | ||
*/ | ||
export interface IconProps<T> extends BaseIconProps<T> { | ||
export interface IconProps<T, E> extends BaseIconProps<T, E> { | ||
/** | ||
* Render the icon main | ||
*/ | ||
renderMain?: (props: IconMainProps<T>) => ReactNode; | ||
renderMain?: (props: IconMainProps<T, E>) => ReactNode; | ||
/** | ||
* Render the icon container | ||
*/ | ||
renderContainer?: (props: IconContainerProps<T>) => ReactNode; | ||
renderContainer?: (props: IconContainerProps<T, E>) => ReactNode; | ||
} | ||
@@ -48,3 +48,3 @@ /** | ||
*/ | ||
export interface IconChildrenProps<T> extends Omit<IconProps<T>, 'renderContainer' | 'renderMain' | 'ref'> { | ||
export interface IconChildrenProps<T, E> extends Omit<IconProps<T, E>, 'renderContainer' | 'renderMain' | 'ref'> { | ||
/** | ||
@@ -60,5 +60,5 @@ * The unique ID of the component | ||
} | ||
export declare type IconMainProps<T> = IconChildrenProps<T>; | ||
export declare type IconContainerProps<T> = Pick<IconProps<T>, 'ref'> & IconChildrenProps<T>; | ||
declare function Icon<T>({ ref, renderMain, renderContainer, ...props }: IconProps<T>): JSX.Element; | ||
export declare type IconMainProps<T, E> = IconChildrenProps<T, E>; | ||
export declare type IconContainerProps<T, E> = Pick<IconProps<T, E>, 'ref'> & IconChildrenProps<T, E>; | ||
declare function Icon<T, E = React.MouseEvent<T, MouseEvent>>({ ref, renderMain, renderContainer, ...props }: IconProps<T, E>): JSX.Element; | ||
export default Icon; |
{ | ||
"name": "@bearei/react-icon", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35416