Created
September 18, 2021 15:35
-
-
Save SafaElmali/81f3ce1fcf033ce556761cbbe01ceafd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "../styles/modal.css"; | |
const ModalWithoutPortal = ({ isOpen, setIsOpen, productName = "" }) => { | |
if (!isOpen) return null; | |
return ( | |
<div className="modal-container"> | |
<div className="modal-header"> | |
<h1>{productName}</h1> | |
</div> | |
<button onClick={() => setIsOpen(false)}>Close modal</button> | |
</div> | |
); | |
}; | |
export default ModalWithoutPortal; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment