Sha256: ab646c37f59bfbdfb558b5909a7f866bd0b1692239d79cc2dac924ccd1b7a8c2
Contents?: true
Size: 436 Bytes
Versions: 2
Compression:
Stored size: 436 Bytes
Contents
import { Controller } from '@hotwired/stimulus' import { useClickOutside } from 'stimulus-use' export default class extends Controller { static targets = ['button', 'bubble', 'content'] connect () { useClickOutside(this) } clickOutside () { this.close() } toggle (e) { this.element.open = !this.element.open } open () { this.element.open = true } close () { this.element.open = false } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solidus_admin-0.0.2 | app/components/solidus_admin/ui/toggletip/component.js |
solidus_admin-0.0.1 | app/components/solidus_admin/ui/toggletip/component.js |