2021-08-26 11:50:47 +05:30
|
|
|
import { Modal } from 'antd';
|
|
|
|
|
import React, { ReactElement } from 'react';
|
2021-02-21 06:02:06 +05:30
|
|
|
|
2021-02-21 06:23:56 +05:30
|
|
|
export const CustomModal = ({
|
|
|
|
|
title,
|
|
|
|
|
children,
|
|
|
|
|
isModalVisible,
|
|
|
|
|
setIsModalVisible,
|
|
|
|
|
footer,
|
|
|
|
|
closable = true,
|
|
|
|
|
}: {
|
|
|
|
|
isModalVisible: boolean;
|
|
|
|
|
closable?: boolean;
|
|
|
|
|
setIsModalVisible: Function;
|
|
|
|
|
footer?: any;
|
|
|
|
|
title: string;
|
|
|
|
|
children: ReactElement;
|
2021-02-21 06:02:06 +05:30
|
|
|
}) => {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
2021-02-21 06:23:56 +05:30
|
|
|
<Modal
|
|
|
|
|
title={title}
|
|
|
|
|
visible={isModalVisible}
|
|
|
|
|
footer={footer}
|
|
|
|
|
closable={closable}
|
2021-02-21 06:02:06 +05:30
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|