ant-design/components/modal/index.jsx

37 lines
783 B
React
Raw Normal View History

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) {
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) {
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) {
const config = objectAssign({}, props, {
2016-03-28 16:09:13 +08:00
iconClassName: 'cross-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) {
const config = objectAssign({}, props, {
okCancel: true,
});
return confirm(config);
2015-09-07 11:48:57 +08:00
};
export default AntModal;