This commit is contained in:
vladp
2026-02-04 18:10:48 +07:00
parent be130520d9
commit a84cd39737
3 changed files with 0 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import React, { ReactNode } from 'react';
interface ModalWindowtProps {
children: ReactNode | null;
state: boolean;
callBack: (value: boolean) => void;
}
export default function ModalWindow({ children, state, callBack }: ModalWindowtProps) {
return (
<>
{state && (
<div
className="modal-wrapper"
onClick={() => {
callBack(false);
}}
>
<div
className="modal-window"
onClick={(e) => e.stopPropagation()}
>
{children}
</div>
</div>
)}
</>
)
}