Sha256: e4908027b962a34ca8c289de855b833df12de799c139bebad14b29ac3b92a4a5
Contents?: true
Size: 655 Bytes
Versions: 40
Compression:
Stored size: 655 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
40 entries across 40 versions & 1 rubygems