A Simple modal
npm install --save simple-react-modal-wj
import { Modal } from 'simple-react-modal-wj'
function EnclosingFunction() {
const [openModal, setOpenModal] = useState(false)
return (
<button onclick={setOpenModal}>Click to open modal 😉</button>
<Modal
isOpen={openModal}
onClose={() => {
setOpenModal(false)
return true
}}
/>
)
}
You can use those props to add specific content through the modal :
title={here you can add a title}
subTitle={here you can add a subtitle near the title}
content={here yu can add your main content}
MIT © WillemJou