Sha256: a14e0bdf160d864772322de9b6dc5113a524d34233b91f1b895ccd230f450076
Contents?: true
Size: 628 Bytes
Versions: 45
Compression:
Stored size: 628 Bytes
Contents
import { Controller } from "@hotwired/stimulus" import { Dropdown } from 'flowbite'; // Connects to data-controller="resource-drop-down" export default class extends Controller { static targets = ["trigger", "menu"] connect() { console.log(`resource-drop-down connected: ${this.element}`) // https://flowbite.com/docs/components/dropdowns/#javascript-behaviour this.dropdown = new Dropdown(this.menuTarget, this.triggerTarget); } disconnect() { this.dropdown = null } toggle() { this.dropdown.toggle() } show() { this.dropdown.show() } hide() { this.dropdown.hide() } }
Version data entries
45 entries across 45 versions & 1 rubygems