git clone https://github.com/wesleylopex/EasyModal.git
<link rel="stylesheet" href="path/to/EasyModal.css">
<div class="my-easy-modal easy-modal easy-modal--fade">
<div class="easy-modal__content">
<h1>
This is your customizable EasyModal body
</h1>
<button class="close-my-easy-modal">
Close EasyModal
</button>
</div>
</div>
<script type="module">
import EasyModal from 'path/to/EasyModal.js'
const myEasyModal = new EasyModal({
el: '.my-easy-modal',
persistent: true,
open: '.open-my-easy-modal',
close: '.close-my-easy-modal',
beforeOpen: () => console.log('before open'),
beforeClose: () => console.log('before close')
})
myEasyModal.start()
</script>