mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
11c0a6a203
Where necessary, prefix the classes imported from react-component with 'Rc' rather than prefixing the Ant classes with 'Ant'. The prefixing of Ant classes wasn't consistent and isn't necessary in many cases.
37 lines
771 B
JavaScript
37 lines
771 B
JavaScript
import Modal from './Modal';
|
|
import confirm from './confirm';
|
|
import objectAssign from 'object-assign';
|
|
|
|
Modal.info = function (props) {
|
|
const config = objectAssign({}, props, {
|
|
iconClassName: 'info-circle',
|
|
okCancel: false,
|
|
});
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.success = function (props) {
|
|
const config = objectAssign({}, props, {
|
|
iconClassName: 'check-circle',
|
|
okCancel: false,
|
|
});
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.error = function (props) {
|
|
const config = objectAssign({}, props, {
|
|
iconClassName: 'exclamation-circle',
|
|
okCancel: false,
|
|
});
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.confirm = function (props) {
|
|
const config = objectAssign({}, props, {
|
|
okCancel: true,
|
|
});
|
|
return confirm(config);
|
|
};
|
|
|
|
export default Modal;
|