ant-design/components/modal/index.jsx

40 lines
679 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 = {
...props,
iconClassName: 'info-circle',
okCancel: false,
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 = {
...props,
iconClassName: 'check-circle',
okCancel: false,
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 = {
...props,
2016-03-28 16:09:13 +08:00
iconClassName: 'cross-circle',
okCancel: false,
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 = {
...props,
okCancel: true,
2016-03-25 18:16:48 +08:00
};
return confirm(config);
2015-09-07 11:48:57 +08:00
};
export default Modal;