Sha256: e23612fba568162dee86f4a2b3d8e9260a556656f9c1618c3f63cb2189210f31
Contents?: true
Size: 511 Bytes
Versions: 161
Compression:
Stored size: 511 Bytes
Contents
import { Controller } from '@hotwired/stimulus' import tippy from 'tippy.js' export default class extends Controller { static values = { url: String, } connect() { const vm = this; tippy(vm.context.element, { content: "loading...", allowHTML: true, theme: 'light', maxWidth: 550, async onShow(instance) { const response = await fetch(vm.urlValue) const content = await response.text() instance.setContent(content) }, }) } }
Version data entries
161 entries across 161 versions & 1 rubygems