fix name
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user