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

index.tsx 633 B

123456789101112131415161718192021222324252627
  1. /*
  2. * @Author: 赵伟
  3. * @Date: 2024-04-15 10:01:29
  4. * @Description: 自定义 Modal
  5. */
  6. import ModalTitle from '@/components/ModalTitle';
  7. import { Modal, type ModalProps } from 'antd';
  8. import classNames from 'classnames';
  9. import './index.less';
  10. export interface KFModalProps extends ModalProps {
  11. image?: string;
  12. }
  13. function KFModal({ title, image, children, className = '', ...rest }: KFModalProps) {
  14. return (
  15. <Modal
  16. className={classNames(['kf-modal', className])}
  17. {...rest}
  18. title={<ModalTitle title={title} image={image}></ModalTitle>}
  19. >
  20. {children}
  21. </Modal>
  22. );
  23. }
  24. export default KFModal;