From da3540bd594e097f2f070149d9ba6f9d40453a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chiciuc=20Nicu=C8=99or?= Date: Fri, 31 Jan 2020 16:09:49 +0200 Subject: [PATCH] Replace NativeButtonProps with ButtonProps for okButtonProps and cancelButtonProps. (#21165) --- components/modal/ActionButton.tsx | 4 ++-- components/modal/Modal.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/modal/ActionButton.tsx b/components/modal/ActionButton.tsx index 9e4afc0ddb..c3f8c7a731 100644 --- a/components/modal/ActionButton.tsx +++ b/components/modal/ActionButton.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import Button from '../button'; -import { ButtonType, NativeButtonProps } from '../button/button'; +import { ButtonType, ButtonProps } from '../button/button'; export interface ActionButtonProps { type?: ButtonType; actionFn?: (...args: any[]) => any | PromiseLike; closeModal: Function; autoFocus?: boolean; - buttonProps?: NativeButtonProps; + buttonProps?: ButtonProps; } export interface ActionButtonState { diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 6401164a5a..683dbeb0d2 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -6,7 +6,7 @@ import addEventListener from 'rc-util/lib/Dom/addEventListener'; import { getConfirmLocale } from './locale'; import Icon from '../icon'; import Button from '../button'; -import { ButtonType, NativeButtonProps } from '../button/button'; +import { ButtonType, ButtonProps } from '../button/button'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; @@ -60,8 +60,8 @@ export interface ModalProps { maskClosable?: boolean; /** 强制渲染 Modal */ forceRender?: boolean; - okButtonProps?: NativeButtonProps; - cancelButtonProps?: NativeButtonProps; + okButtonProps?: ButtonProps; + cancelButtonProps?: ButtonProps; destroyOnClose?: boolean; style?: React.CSSProperties; wrapClassName?: string; @@ -90,8 +90,8 @@ export interface ModalFuncProps { // TODO: find out exact types onOk?: (...args: any[]) => any; onCancel?: (...args: any[]) => any; - okButtonProps?: NativeButtonProps; - cancelButtonProps?: NativeButtonProps; + okButtonProps?: ButtonProps; + cancelButtonProps?: ButtonProps; centered?: boolean; width?: string | number; iconClassName?: string;