mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix(Modal): allow ReactNode for okText and cancelText props
This commit is contained in:
parent
031876bbf3
commit
e0edd82a76
@ -35,11 +35,11 @@ export interface ModalProps {
|
||||
/** 底部内容*/
|
||||
footer?: React.ReactNode;
|
||||
/** 确认按钮文字*/
|
||||
okText?: string;
|
||||
okText?: React.ReactNode | string;
|
||||
/** 确认按钮类型*/
|
||||
okType?: ButtonType;
|
||||
/** 取消按钮文字*/
|
||||
cancelText?: string;
|
||||
cancelText?: React.ReactNode | string;
|
||||
/** 点击蒙层是否允许关闭*/
|
||||
maskClosable?: boolean;
|
||||
/** 强制渲染 Modal*/
|
||||
@ -75,9 +75,9 @@ export interface ModalFuncProps {
|
||||
centered?: boolean;
|
||||
width?: string | number;
|
||||
iconClassName?: string;
|
||||
okText?: string;
|
||||
okText?: React.ReactNode | string;
|
||||
okType?: ButtonType;
|
||||
cancelText?: string;
|
||||
cancelText?: React.ReactNode | string;
|
||||
icon?: React.ReactNode;
|
||||
/* Deperated */
|
||||
iconType?: string;
|
||||
@ -132,8 +132,8 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
||||
prefixCls: PropTypes.string,
|
||||
onOk: PropTypes.func,
|
||||
onCancel: PropTypes.func,
|
||||
okText: PropTypes.string,
|
||||
cancelText: PropTypes.string,
|
||||
okText: PropTypes.node,
|
||||
cancelText: PropTypes.node,
|
||||
centered: PropTypes.bool,
|
||||
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
confirmLoading: PropTypes.bool,
|
||||
|
Loading…
Reference in New Issue
Block a user