|
@@ -68,6 +68,7 @@ const defaultProps = {
|
|
|
cancelBorderColor: '#414141',
|
|
|
cancelBg: '#fff',
|
|
|
width: '300px',
|
|
|
+ height: '200px',
|
|
|
};
|
|
|
|
|
|
class ConfirmModal extends Component {
|
|
@@ -123,10 +124,12 @@ class ConfirmModal extends Component {
|
|
|
closable,
|
|
|
noFooter
|
|
|
} = this.props;
|
|
|
+ const marginLeft = -parseInt(width)/2
|
|
|
+ const marginTop = -parseInt(height)/2
|
|
|
return (
|
|
|
<NewPortal visible={visible}>
|
|
|
<div className={styles['modal-wrapper']} id='confirm'>
|
|
|
- <div className={styles[['modal']]} style = {{width: width, height:height}}>
|
|
|
+ <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, height:height, marginTop:marginTop}}>
|
|
|
<div className={styles['modal-title']} style={{background: titleBg}}>{title ? title : ''} {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}</div>
|
|
|
<div className={styles['modal-content']}>{children}</div>
|
|
|
{noFooter ? '' : <div className={styles['modal-operator']+' clearfix'}>
|