From 79f9fa3f347c25497236551a688f92ca7e78ba4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=9D=92=E5=B7=9D?= <46062972+ShenQingchuan@users.noreply.github.com> Date: Fri, 17 Sep 2021 10:23:50 +0800 Subject: [PATCH] fix: ModalFuncProps types which can be string text --- components/modal/Modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 09dbca361f..3036d159b5 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -95,9 +95,9 @@ export interface ModalFuncProps { prefixCls?: string; class?: string; visible?: boolean; - title?: (() => VNodeTypes) | VNodeTypes; + title?: string | (() => VNodeTypes) | VNodeTypes; closable?: boolean; - content?: (() => VNodeTypes) | VNodeTypes; + content?: string | (() => VNodeTypes) | VNodeTypes; // TODO: find out exact types onOk?: (...args: any[]) => any; onCancel?: (...args: any[]) => any; @@ -105,9 +105,9 @@ export interface ModalFuncProps { cancelButtonProps?: ButtonPropsType; centered?: boolean; width?: string | number; - okText?: (() => VNodeTypes) | VNodeTypes; + okText?: string | (() => VNodeTypes) | VNodeTypes; okType?: LegacyButtonType; - cancelText?: (() => VNodeTypes) | VNodeTypes; + cancelText?: string | (() => VNodeTypes) | VNodeTypes; icon?: (() => VNodeTypes) | VNodeTypes; /* Deprecated */ iconType?: string;