Browse Source

Replace NativeButtonProps with ButtonProps for okButtonProps and cancelButtonProps. (#21165)

pull/21188/head
Chiciuc Nicușor 5 years ago
committed by GitHub
parent
commit
da3540bd59
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/modal/ActionButton.tsx
  2. 10
      components/modal/Modal.tsx

4
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<any>;
closeModal: Function;
autoFocus?: boolean;
buttonProps?: NativeButtonProps;
buttonProps?: ButtonProps;
}
export interface ActionButtonState {

10
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;

Loading…
Cancel
Save