Skip to content

Commit

Permalink
type(Avatar): fix icon type error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 19, 2023
1 parent 2d2c9af commit 154aa3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-avatar/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Icon, { IconProps } from '@uiw/react-icon';
import Icon, { IconProps, TagType } from '@uiw/react-icon';
import { HTMLSpanProps, noop } from '@uiw/utils';
import './style/index.less';
import { useState } from 'react';
Expand All @@ -9,7 +9,7 @@ export interface AvatarProps extends HTMLSpanProps {
style?: React.CSSProperties;
className?: string;
prefixCls?: string;
icon?: IconProps['type'];
icon?: IconProps<TagType>['type'];
alt?: string;
src?: string;
size?: 'large' | 'default' | 'small' | 'mini';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-icon/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import svgPaths from '@uiw/icons/fonts/w-icon.json';
import './style/index.less';

export type IconsName = keyof typeof svgPaths;
type TagType = React.ElementType | keyof JSX.IntrinsicElements;
export type TagType = React.ElementType | keyof JSX.IntrinsicElements;
type ElementProps<T extends TagType, E = React.ReactElement> = {
fill?: string;
style?: React.CSSProperties;
Expand Down

0 comments on commit 154aa3d

Please sign in to comment.