mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
For #11537, Centered style should be applied to the wrap element.
This commit is contained in:
parent
f4d631ddc2
commit
eab74fa693
@ -181,7 +181,7 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { footer, visible, className, centered, prefixCls, ...restProps } = this.props;
|
||||
const { footer, visible, wrapClassName, centered, prefixCls, ...restProps } = this.props;
|
||||
|
||||
const defaultFooter = (
|
||||
<LocaleReceiver
|
||||
@ -196,7 +196,7 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
||||
<Dialog
|
||||
{...restProps}
|
||||
prefixCls={prefixCls}
|
||||
className={classNames({ [`${prefixCls}-centered`]: !!centered }, className)}
|
||||
wrapClassName={classNames({ [`${prefixCls}-centered`]: !!centered }, wrapClassName)}
|
||||
footer={footer === undefined ? defaultFooter : footer}
|
||||
visible={visible}
|
||||
mousePosition={mousePosition}
|
||||
|
@ -32,9 +32,6 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
|
||||
const classString = classNames(
|
||||
prefixCls,
|
||||
`${prefixCls}-${props.type}`,
|
||||
{
|
||||
[`${prefixCls}-centered`]: !!props.centered,
|
||||
},
|
||||
props.className,
|
||||
);
|
||||
|
||||
@ -47,6 +44,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
|
||||
return (
|
||||
<Dialog
|
||||
className={classString}
|
||||
wrapClassName={classNames({ [`${prefixCls}-centered`]: !!props.centered })}
|
||||
onCancel={close.bind(this, { triggerCancel: true })}
|
||||
visible={visible}
|
||||
title=""
|
||||
|
Loading…
Reference in New Issue
Block a user