Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 4x | import React, {ReactNode} from 'react';
import {Modal, ModalProps, Result, ResultProps} from 'antd';
import {ExclamationCircleFilled} from '@ant-design/icons';
export interface LLResultModalProps extends ModalProps, ResultProps {
children: ReactNode;
}
const LLResultModal = (props: LLResultModalProps) => {
const {children, visible, status, icon, title, subTitle, extra, prefixCls, ...rest} = props;
const resultProps = {
status,
title,
subTitle,
extra,
prefixCls,
icon: status === 'warning' && icon === undefined ? <ExclamationCircleFilled /> : icon
};
return (
<Modal title="" visible={visible} footer={null} {...rest}>
<Result {...resultProps} />
{children}
</Modal>
);
};
export default LLResultModal;
|