Sha256: a5f0671d7f593202d00eb2342a82bb7a2e1e87cb14ff35c5c77d9a34679d1ba3
Contents?: true
Size: 652 Bytes
Versions: 45
Compression:
Stored size: 652 Bytes
Contents
import { Controller } from "@hotwired/stimulus" export default class extends Controller { static targets = [ "dialog", "zoomedImage", "download", "share" ] show(event) { this.dialogTarget.showModal() this.#set(event.target.parentNode) } close() { this.dialogTarget.close() } reset() { this.zoomedImageTarget.src = "" this.downloadTarget.href = "" this.shareTarget.dataset.webShareFileValue = "" } #set(target) { this.zoomedImageTarget.src = target.href this.downloadTarget.href = target.dataset.lightboxUrlValue this.shareTarget.dataset.webShareFileValue = target.dataset.lightboxUrlValue } }
Version data entries
45 entries across 45 versions & 1 rubygems