diff --git a/packages/react-drawer/src/index.tsx b/packages/react-drawer/src/index.tsx index 541b04ebbe..08cb29b6cd 100644 --- a/packages/react-drawer/src/index.tsx +++ b/packages/react-drawer/src/index.tsx @@ -1,13 +1,13 @@ import React, { useMemo } from 'react'; import Overlay, { OverlayProps } from '@uiw/react-overlay'; -import Icon, { IconProps } from '@uiw/react-icon'; +import Icon, { IconProps, IconTagType } from '@uiw/react-icon'; import Button from '@uiw/react-button'; import { HTMLDivProps } from '@uiw/utils'; import './style/index.less'; export interface DrawerProps extends OverlayProps { footer?: React.ReactNode; - icon?: IconProps['type']; + icon?: IconProps['type']; title?: React.ReactNode; bodyProps?: HTMLDivProps; placement?: 'top' | 'right' | 'bottom' | 'left'; diff --git a/packages/react-file-input/src/List.tsx b/packages/react-file-input/src/List.tsx index f5a69b0d28..87948a8f7f 100644 --- a/packages/react-file-input/src/List.tsx +++ b/packages/react-file-input/src/List.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { HTMLAttributes } from 'react'; import Icon from '@uiw/react-icon'; import { FileInputListProps } from './'; import './style/index.less'; @@ -34,7 +34,7 @@ const Picture = (props: FileInputListProps) => { React.isValidElement(children) && React.cloneElement(children, { onClick: onAdd, - })} + } as HTMLAttributes)}
{dataList.map((item, index) => (
diff --git a/packages/react-message/src/index.tsx b/packages/react-message/src/index.tsx index 65be82a6a5..10bb9a7801 100644 --- a/packages/react-message/src/index.tsx +++ b/packages/react-message/src/index.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { CSSTransition } from 'react-transition-group'; -import Icon, { IconProps } from '@uiw/react-icon'; +import Icon, { IconProps, IconTagType } from '@uiw/react-icon'; import Button from '@uiw/react-button'; import './style/index.less'; import { IProps, HTMLDivProps } from '@uiw/utils'; export interface MessageProps extends IProps, Omit { title?: React.ReactNode; - icon?: IconProps['type']; + icon?: IconProps['type']; type?: 'success' | 'warning' | 'info' | 'error'; description?: React.ReactNode; showIcon?: boolean; diff --git a/packages/react-modal/src/index.tsx b/packages/react-modal/src/index.tsx index 598b1eacb1..981bbbf5c7 100644 --- a/packages/react-modal/src/index.tsx +++ b/packages/react-modal/src/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import Overlay, { OverlayProps } from '@uiw/react-overlay'; import Button, { ButtonType, ButtonProps } from '@uiw/react-button'; -import Icon, { IconProps } from '@uiw/react-icon'; +import Icon, { IconProps, IconTagType } from '@uiw/react-icon'; import { IProps, noop } from '@uiw/utils'; import './style/index.less'; import CallShow from './CallShow'; @@ -14,7 +14,7 @@ export interface ModalProps extends IProps, OverlayProps { content?: React.ReactNode; confirmText?: string; title?: string; - icon?: IconProps['type']; + icon?: IconProps['type']; useButton?: boolean; usePortal?: boolean; autoFocus?: boolean; diff --git a/packages/react-progress/src/Circle.tsx b/packages/react-progress/src/Circle.tsx index b33d66a296..fd59d5ed35 100644 --- a/packages/react-progress/src/Circle.tsx +++ b/packages/react-progress/src/Circle.tsx @@ -7,8 +7,8 @@ import './style/circle.less'; export type Status = 'success' | 'active' | 'exception'; -type TagType = React.ComponentType | keyof JSX.IntrinsicElements; -export interface ProgressCircleProps extends IProps, HTMLDivProps { +export type ProgressCircleTagType = React.ComponentType | keyof JSX.IntrinsicElements; +export interface ProgressCircleProps extends IProps, HTMLDivProps { type?: IconProps['type']; status?: Status; showText?: boolean; // 是否显示进度条文字内容 @@ -18,7 +18,7 @@ export interface ProgressCircleProps extends IProps, format?: (percent: number) => React.ReactNode; } -export default class Circle extends React.Component> { +export default class Circle extends React.Component> { public static defaultProps: ProgressCircleProps<'span'> = { prefixCls: 'w-progress', showText: true, diff --git a/packages/react-progress/src/Line.tsx b/packages/react-progress/src/Line.tsx index a7313fa04f..b3ead38fb2 100644 --- a/packages/react-progress/src/Line.tsx +++ b/packages/react-progress/src/Line.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { IconProgress } from './utils'; -import { ProgressCircleProps } from './Circle'; +import { ProgressCircleProps, ProgressCircleTagType } from './Circle'; import './style/index.less'; import './style/line.less'; -export interface ProgressLineProp extends ProgressCircleProps {} +export interface ProgressLineProp extends ProgressCircleProps {} -export default class Line extends React.Component> { - public static defaultProps: ProgressLineProp<{}> = { +export default class Line extends React.Component> { + public static defaultProps: ProgressLineProp = { prefixCls: 'w-progress', showText: true, // 是否显示进度条文字内容 percent: 0, // 百分比(必填)