Sha256: d1fc7fc1d28454692c490994ab8e5c9009ca9094cb2a489bb6a70bcb08f7316d
Contents?: true
Size: 396 Bytes
Versions: 11
Compression:
Stored size: 396 Bytes
Contents
// Inspired by: https://github.com/excid3/tailwindcss-stimulus-components/blob/master/src/popover.js import { Controller } from "@hotwired/stimulus"; export default class UIToggleController extends Controller { connect() {} toggle() { if (this.element.dataset.state == "on") { this.element.dataset.state = "off"; } else { this.element.dataset.state = "on"; } } }
Version data entries
11 entries across 11 versions & 1 rubygems