mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 20:42:04 +08:00

* chore: eslint is updated * chore: some eslint fixes are made * chore: some more eslint fix are updated * chore: some eslint fix is made * chore: styled components type is added * chore: some more eslint fix are made * chore: some more eslint fix are updated * chore: some more eslint fix are updated * fix: eslint fixes Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
37 lines
599 B
TypeScript
37 lines
599 B
TypeScript
import { Modal, ModalProps as Props } from 'antd';
|
|
import React, { ReactElement } from 'react';
|
|
|
|
function CustomModal({
|
|
title,
|
|
children,
|
|
isModalVisible,
|
|
footer,
|
|
closable = true,
|
|
}: ModalProps): JSX.Element {
|
|
return (
|
|
<Modal
|
|
title={title}
|
|
visible={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;
|