Sha256: 5cb6bafcc607423554c1303d8622976b452ace0710cbbfd4dc9a14d8e9f7083a

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

// Inspired By: https://github.com/stimulus-components/stimulus-dropdown/blob/master/src/index.ts
import { Controller } from "@hotwired/stimulus";
import { useTransition } from "stimulus-use";

export default class extends Controller {
  //   menuTarget: HTMLElement
  //   toggleTransition: (event?: Event) => void
  //   leave: (event?: Event) => void
  //   transitioned: false
  //   static targets = ['menu']
  //   connect (): void {
  //     useTransition(this, {
  //       element: this.menuTarget
  //     })
  //   }
  //   toggle (): void {
  //     this.toggleTransition()
  //   }
  //   hide (event: Event): void {
  //     // @ts-ignore
  //     if (!this.element.contains(event.target) && !this.menuTarget.classList.contains('hidden')) {
  //       this.leave()
  //     }
  //   }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shadcn-ui-0.0.1 app/javascript/controllers/ui/dropdown_controller.js