ant-design/components/modal/index.jsx

54 lines
924 B
React
Raw Normal View History

import Modal from './Modal';
2015-09-07 11:48:57 +08:00
import confirm from './confirm';
Modal.info = function (props) {
2016-03-25 18:16:48 +08:00
const config = {
type: 'info',
iconType: 'info-circle',
okCancel: false,
...props,
2016-03-25 18:16:48 +08:00
};
return confirm(config);
2015-09-07 11:48:57 +08:00
};
Modal.success = function (props) {
2016-03-25 18:16:48 +08:00
const config = {
type: 'success',
iconType: 'check-circle',
okCancel: false,
...props,
2016-03-25 18:16:48 +08:00
};
return confirm(config);
2015-09-07 11:48:57 +08:00
};
Modal.error = function (props) {
2016-03-25 18:16:48 +08:00
const config = {
type: 'error',
iconType: 'cross-circle',
okCancel: false,
...props,
2016-03-25 18:16:48 +08:00
};
return confirm(config);
2015-09-07 11:48:57 +08:00
};
2016-04-11 14:59:37 +08:00
Modal.warning = function (props) {
const config = {
type: 'warning',
iconType: 'exclamation-circle',
okCancel: false,
...props,
};
return confirm(config);
};
Modal.confirm = function (props) {
2016-03-25 18:16:48 +08:00
const config = {
type: 'confirm',
okCancel: true,
...props,
2016-03-25 18:16:48 +08:00
};
return confirm(config);
2015-09-07 11:48:57 +08:00
};
export default Modal;