Finished fixed modal
This commit is contained in:
16
src/components/UI/ModalLayout/ModalLayout.jsx
Normal file
16
src/components/UI/ModalLayout/ModalLayout.jsx
Normal file
@ -0,0 +1,16 @@
|
||||
import React from "react";
|
||||
|
||||
export const ModalLayout = ({ active, setActive, children }) => {
|
||||
return (
|
||||
<div
|
||||
className={active ? "modal-add active" : "modal-add"}
|
||||
onClick={() => setActive(false)}
|
||||
>
|
||||
<div className="modal-add__content" onClick={(e) => e.stopPropagation()}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ModalLayout;
|
Reference in New Issue
Block a user