Sha256: 3946e6971c7cae887899a47657946c5562f4ff857ef038087919265357241248
Contents?: true
Size: 550 Bytes
Versions: 36
Compression:
Stored size: 550 Bytes
Contents
import { Controller } from "@hotwired/stimulus" import { Collapse } from 'flowbite'; // Connects to data-controller="resource-collapse" export default class extends Controller { static targets = ["trigger", "menu"] connect() { console.log(`resource-collapse connected: ${this.element}`) this.collapse = new Collapse(this.menuTarget, this.triggerTarget); } disconnect() { this.collapse = null } toggle() { this.collapse.toggle() } show() { this.collapse.show() } hide() { this.collapse.hide() } }
Version data entries
36 entries across 36 versions & 1 rubygems