Browse Source

chore: fix types declaration (#32935)

pull/32940/head
huangkairan 3 years ago
committed by GitHub
parent
commit
b03fae3f70
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/card/index.tsx
  2. 2
      components/message/index.tsx
  3. 2
      components/modal/Modal.tsx
  4. 2
      components/tree/utils/iconUtil.tsx

2
components/card/index.tsx

@ -49,7 +49,7 @@ export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 't
cover?: React.ReactNode;
actions?: React.ReactNode[];
tabList?: CardTabListType[];
tabBarExtraContent?: React.ReactNode | null;
tabBarExtraContent?: React.ReactNode;
onTabChange?: (key: string) => void;
activeTabKey?: string;
defaultActiveTabKey?: string;

2
components/message/index.tsx

@ -198,7 +198,7 @@ function notice(args: ArgsProps): MessageType {
return result;
}
type ConfigContent = React.ReactNode | string;
type ConfigContent = React.ReactNode;
type ConfigDuration = number | (() => void);
type JointContent = ConfigContent | ArgsProps;
export type ConfigOnClose = () => void;

2
components/modal/Modal.tsx

@ -38,7 +38,7 @@ export interface ModalProps {
/** 确定按钮 loading */
confirmLoading?: boolean;
/** 标题 */
title?: React.ReactNode | string;
title?: React.ReactNode;
/** 是否显示右上角的关闭按钮 */
closable?: boolean;
/** 点击确定回调 */

2
components/tree/utils/iconUtil.tsx

@ -10,7 +10,7 @@ import { isValidElement, cloneElement } from '../../_util/reactNode';
export default function renderSwitcherIcon(
prefixCls: string,
switcherIcon: React.ReactNode | null | undefined,
switcherIcon: React.ReactNode,
showLine: boolean | { showLeafIcon: boolean } | undefined,
{ isLeaf, expanded, loading }: AntTreeNodeProps,
) {

Loading…
Cancel
Save