Sha256: 8c69f380c7f1c87e3227613ef796500e7e7b1dbc9aedfc4c1ddf09b6b961983f

Contents?: true

Size: 344 Bytes

Versions: 138

Compression:

Stored size: 344 Bytes

Contents

import { Controller } from 'stimulus'
import { useClickOutside } from 'stimulus-use'

export default class extends Controller {
  static targets = ['panel']

  connect() {
    useClickOutside(this)
  }

  clickOutside() {
    this.panelTarget.classList.add('hidden')
  }

  togglePanel() {
    this.panelTarget.classList.toggle('hidden')
  }
}

Version data entries

138 entries across 138 versions & 1 rubygems

Version Path
avo-1.19.1.pre.3 app/packs/js/controllers/toggle_panel_controller.js
avo-1.19.1.pre.2 app/packs/js/controllers/toggle_panel_controller.js
avo-1.19.1.pre.1 app/packs/js/controllers/toggle_panel_controller.js
avo-1.19.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.2 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.2.pre.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.1 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.0.pre.3 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.0.pre.2 app/packs/js/controllers/toggle_panel_controller.js
avo-1.18.0.pre.1 app/packs/js/controllers/toggle_panel_controller.js
avo-1.17.1 app/packs/js/controllers/toggle_panel_controller.js
avo-1.17.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.16.4 app/packs/js/controllers/toggle_panel_controller.js
avo-1.16.3 app/packs/js/controllers/toggle_panel_controller.js
avo-1.16.2 app/packs/js/controllers/toggle_panel_controller.js
avo-1.16.1 app/packs/js/controllers/toggle_panel_controller.js
avo-1.16.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.15.0 app/packs/js/controllers/toggle_panel_controller.js
avo-1.15.0.pre.1 app/packs/js/controllers/toggle_panel_controller.js