tabletop-companion/app/javascript/controllers/modal_closer_controller.js

10 lines
236 B
JavaScript

import { Controller } from "@hotwired/stimulus"
// Connects to data-controller="modal-closer"
export default class extends Controller {
closeModal() {
const modal = document.getElementById("modal")
modal.innerHTML = ""
}
}