2016-01-12 17:07:24 +08:00
|
|
|
import AntModal from './Modal';
|
2015-09-07 11:48:57 +08:00
|
|
|
import confirm from './confirm';
|
2016-01-13 22:22:33 +08:00
|
|
|
import objectAssign from 'object-assign';
|
2015-09-07 11:48:57 +08:00
|
|
|
|
2015-09-11 16:46:28 +08:00
|
|
|
AntModal.info = function (props) {
|
2016-01-07 17:46:46 +08:00
|
|
|
const config = objectAssign({}, props, {
|
|
|
|
iconClassName: 'info-circle',
|
|
|
|
okCancel: false,
|
|
|
|
});
|
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2015-09-11 16:46:28 +08:00
|
|
|
AntModal.success = function (props) {
|
2016-01-07 17:46:46 +08:00
|
|
|
const config = objectAssign({}, props, {
|
|
|
|
iconClassName: 'check-circle',
|
|
|
|
okCancel: false,
|
|
|
|
});
|
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2015-09-11 16:46:28 +08:00
|
|
|
AntModal.error = function (props) {
|
2016-01-07 17:46:46 +08:00
|
|
|
const config = objectAssign({}, props, {
|
|
|
|
iconClassName: 'exclamation-circle',
|
|
|
|
okCancel: false,
|
|
|
|
});
|
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2015-09-11 16:46:28 +08:00
|
|
|
AntModal.confirm = function (props) {
|
2016-01-07 17:46:46 +08:00
|
|
|
const config = objectAssign({}, props, {
|
|
|
|
okCancel: true,
|
|
|
|
});
|
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default AntModal;
|