app/javascript/controllers/ui/dropdown_controller.js in shadcn-ui-0.0.1 vs app/javascript/controllers/ui/dropdown_controller.js in shadcn-ui-0.0.2

- old
+ new

@@ -1,25 +1,5 @@ // Inspired By: https://github.com/stimulus-components/stimulus-dropdown/blob/master/src/index.ts -import { Controller } from "@hotwired/stimulus"; +import UIPopover from "controllers/ui/popover_controller"; 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() - // } - // } -} +export default class extends UIPopover {}