2016-03-21 21:16:38 +08:00
|
|
|
import Modal from './Modal';
|
2015-09-07 11:48:57 +08:00
|
|
|
import confirm from './confirm';
|
|
|
|
|
2016-03-21 21:16:38 +08:00
|
|
|
Modal.info = function (props) {
|
2016-03-25 18:16:48 +08:00
|
|
|
const config = {
|
|
|
|
...props,
|
2016-01-07 17:46:46 +08:00
|
|
|
iconClassName: 'info-circle',
|
|
|
|
okCancel: false,
|
2016-03-25 18:16:48 +08:00
|
|
|
};
|
2016-01-07 17:46:46 +08:00
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2016-03-21 21:16:38 +08:00
|
|
|
Modal.success = function (props) {
|
2016-03-25 18:16:48 +08:00
|
|
|
const config = {
|
|
|
|
...props,
|
2016-01-07 17:46:46 +08:00
|
|
|
iconClassName: 'check-circle',
|
|
|
|
okCancel: false,
|
2016-03-25 18:16:48 +08:00
|
|
|
};
|
2016-01-07 17:46:46 +08:00
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2016-03-21 21:16:38 +08:00
|
|
|
Modal.error = function (props) {
|
2016-03-25 18:16:48 +08:00
|
|
|
const config = {
|
|
|
|
...props,
|
2016-03-28 16:09:13 +08:00
|
|
|
iconClassName: 'cross-circle',
|
2016-01-07 17:46:46 +08:00
|
|
|
okCancel: false,
|
2016-03-25 18:16:48 +08:00
|
|
|
};
|
2016-01-07 17:46:46 +08:00
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2016-03-21 21:16:38 +08:00
|
|
|
Modal.confirm = function (props) {
|
2016-03-25 18:16:48 +08:00
|
|
|
const config = {
|
|
|
|
...props,
|
2016-01-07 17:46:46 +08:00
|
|
|
okCancel: true,
|
2016-03-25 18:16:48 +08:00
|
|
|
};
|
2016-01-07 17:46:46 +08:00
|
|
|
return confirm(config);
|
2015-09-07 11:48:57 +08:00
|
|
|
};
|
|
|
|
|
2016-03-21 21:16:38 +08:00
|
|
|
export default Modal;
|