mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-10 05:58:39 +08:00
40 lines
679 B
JavaScript
40 lines
679 B
JavaScript
import Modal from './Modal';
|
|
import confirm from './confirm';
|
|
|
|
Modal.info = function (props) {
|
|
const config = {
|
|
...props,
|
|
iconClassName: 'info-circle',
|
|
okCancel: false,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.success = function (props) {
|
|
const config = {
|
|
...props,
|
|
iconClassName: 'check-circle',
|
|
okCancel: false,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.error = function (props) {
|
|
const config = {
|
|
...props,
|
|
iconClassName: 'cross-circle',
|
|
okCancel: false,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.confirm = function (props) {
|
|
const config = {
|
|
...props,
|
|
okCancel: true,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
export default Modal;
|