Sha256: 99fc53076f7b25aa6e570912ccb14140b027389355f68599b3c90924309231ca
Contents?: true
Size: 539 Bytes
Versions: 15
Compression:
Stored size: 539 Bytes
Contents
import "clipboard" class ClipboardButton extends HTMLElement { constructor() { super() this.innerHTML = ` <i class="icon ri-clipboard-line ri-fw"></i> ` this.clipboard = new ClipboardJS(this, { text: () => { return this.getAttribute("content") } }) this.clipboard.on("success", () => { Alchemy.growl(this.getAttribute("success-text")) }) } disconnectedCallback() { this.clipboard.destroy() } } customElements.define("alchemy-clipboard-button", ClipboardButton)
Version data entries
15 entries across 15 versions & 1 rubygems