Sha256: f362423d8b8139ca113f18bfee119b777b2499e56125312faad337e397d1e86b
Contents?: true
Size: 388 Bytes
Versions: 3
Compression:
Stored size: 388 Bytes
Contents
import { Controller } from "stimulus" export default class extends Controller { connect() { this.element[this.identifier] = this } close() { this.element.remove() this.modalTurboFrame.src = null } escClose(event) { if (event.key === 'Escape') this.close() } get modalTurboFrame() { return document.querySelector("turbo-frame[id='modal']") } }
Version data entries
3 entries across 3 versions & 1 rubygems