ant-design/components/modal/index.jsx

44 lines
743 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
};
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;