This commit is contained in:
smanylov
2025-12-18 17:21:18 +07:00
parent a538fe1684
commit 7540dd57de
8 changed files with 201 additions and 46 deletions
+32
View File
@@ -0,0 +1,32 @@
import React, { ReactNode } from 'react';
interface ModalWindowtProps {
children: ReactNode;
state: boolean;
callBack: (value: boolean) => void;
}
export default function ModalWindow({ children, state, callBack }: ModalWindowtProps) {
console.log(state);
return (
<>
{state && (
<div
className="modal-wrapper"
onClick={() => {
callBack(false);
}}
>
<div
className="modal-window"
onClick={(e) => e.stopPropagation()}
>
{children}
</div>
</div>
)
}
</>
)
}