 modal.innerHTML =
            "<p>" +
            message +
            "</p><button onclick='closeModal(event)'>" +
            cta +
            "</button>";
          document.body.appendChild(modal);
        }
      }

      function closeModal(e) {
        e.preventDefault();
        var modal = e.target.parentNode;
        modal.classList.add("shrink");
        setTimeout(function () {
          modal.remove();
        }, 1000);
      }
    </script>
  </body>
</html>
