mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-19 18:41:09 +08:00

* chore: added jsx-runtime plugin in eslint tsconfig Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: updated react imports Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: renamed redux dispatch Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * fix: build is fixed --------- Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com>
37 lines
589 B
TypeScript
37 lines
589 B
TypeScript
import { Modal, ModalProps as Props } from 'antd';
|
|
import { ReactElement } from 'react';
|
|
|
|
function CustomModal({
|
|
title,
|
|
children,
|
|
isModalVisible,
|
|
footer,
|
|
closable = true,
|
|
}: ModalProps): JSX.Element {
|
|
return (
|
|
<Modal
|
|
title={title}
|
|
open={isModalVisible}
|
|
footer={footer}
|
|
closable={closable}
|
|
>
|
|
{children}
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
interface ModalProps {
|
|
isModalVisible: boolean;
|
|
closable?: boolean;
|
|
footer?: Props['footer'];
|
|
title: string;
|
|
children: ReactElement;
|
|
}
|
|
|
|
CustomModal.defaultProps = {
|
|
closable: undefined,
|
|
footer: undefined,
|
|
};
|
|
|
|
export default CustomModal;
|