You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.1 KiB

import Modal, { ModalFuncProps } from './Modal';
import confirm from './confirm';
export { ActionButtonProps } from './ActionButton';
export { ModalProps, ModalFuncProps } from './Modal';
6 years ago
Modal.info = function(props: ModalFuncProps) {
const config = {
type: 'info',
iconType: 'info-circle',
okCancel: false,
...props,
};
return confirm(config);
};
6 years ago
Modal.success = function(props: ModalFuncProps) {
const config = {
type: 'success',
iconType: 'check-circle',
okCancel: false,
...props,
};
return confirm(config);
};
6 years ago
Modal.error = function(props: ModalFuncProps) {
const config = {
type: 'error',
iconType: 'close-circle',
okCancel: false,
...props,
};
return confirm(config);
};
6 years ago
Modal.warning = Modal.warn = function(props: ModalFuncProps) {
const config = {
type: 'warning',
iconType: 'exclamation-circle',
okCancel: false,
...props,
};
return confirm(config);
};
6 years ago
Modal.confirm = function(props: ModalFuncProps) {
const config = {
type: 'confirm',
okCancel: true,
...props,
};
return confirm(config);
};
export default Modal;