Sha256: 419c0782c7e9d55cb005aee428df84898cba33abf51b36adc00ad0a6268a1934
Contents?: true
Size: 540 Bytes
Versions: 3
Compression:
Stored size: 540 Bytes
Contents
import { CocoComponent } from "@js/coco.js"; import { getComponent } from "@helpers/alpine"; export default CocoComponent("buttonDropdown", (data = {}) => { return { dropdown: null, button: null, init() { this.$nextTick(() => { this.button = getComponent(this.$el.querySelector(".coco-button")); }); }, hideDropdown() { if (this.dropdown) { this.dropdown.hide(); } }, showDropdown() { if (this.dropdown) { this.dropdown.show(); } }, }; });
Version data entries
3 entries across 3 versions & 1 rubygems