mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 21:59:41 +08:00
67024893ce
* fix progress icon * remove IconDisplay fields.js * update progress test snapshot * fix form item circle filled * update form-item test snapshot * fix close icon in upload item list * fix alert icon theme * update alert test snapshot * fix time picker clear icon * fix test snapshot * fix rotate icon in the header * update test snapshot * update new tree test snapshot * fix icon position * fix old icon and new icon both display * fix card actions icon position
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import Modal, { ModalFuncProps } from './Modal';
|
|
import confirm from './confirm';
|
|
|
|
export { ActionButtonProps } from './ActionButton';
|
|
export { ModalProps, ModalFuncProps } from './Modal';
|
|
|
|
Modal.info = function (props: ModalFuncProps) {
|
|
const config = {
|
|
type: 'info',
|
|
iconType: 'info-circle',
|
|
okCancel: false,
|
|
...props,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.success = function (props: ModalFuncProps) {
|
|
const config = {
|
|
type: 'success',
|
|
iconType: 'check-circle',
|
|
okCancel: false,
|
|
...props,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.error = function (props: ModalFuncProps) {
|
|
const config = {
|
|
type: 'error',
|
|
iconType: 'close-circle',
|
|
okCancel: false,
|
|
...props,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.warning = Modal.warn = function (props: ModalFuncProps) {
|
|
const config = {
|
|
type: 'warning',
|
|
iconType: 'exclamation-circle',
|
|
okCancel: false,
|
|
...props,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
Modal.confirm = function (props: ModalFuncProps) {
|
|
const config = {
|
|
type: 'confirm',
|
|
okCancel: true,
|
|
...props,
|
|
};
|
|
return confirm(config);
|
|
};
|
|
|
|
export default Modal;
|