Sha256: 162e31311f9de9decbac659cb6da9e1ceefc66b3fa8753ed16651b5f507d072b

Contents?: true

Size: 283 Bytes

Versions: 5

Compression:

Stored size: 283 Bytes

Contents

import { Controller } from "@hotwired/stimulus"
import { useClickOutside } from "stimulus-use"

export default class extends Controller {
  connect() {
    useClickOutside(this)
  }

  clickOutside() {
    this.close()
  }

  close() {
    this.element.removeAttribute("open")
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/layout/navigation/account/component.js
solidus_admin-0.3.1 app/components/solidus_admin/layout/navigation/account/component.js
solidus_admin-0.3.0 app/components/solidus_admin/layout/navigation/account/component.js
solidus_admin-0.2.0 app/components/solidus_admin/layout/navigation/account/component.js
solidus_admin-0.1.0 app/components/solidus_admin/layout/navigation/account/component.js