Address PR feedback

This commit is contained in:
Andy Smith
2025-04-09 14:09:08 -05:00
parent 22ff4ee18c
commit 7b8ed815cd
6 changed files with 23 additions and 34 deletions
@@ -0,0 +1,13 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = [ "details" ]
close() {
this.detailsTarget.removeAttribute("open")
}
closeOnClickOutside({ target }) {
if (!this.element.contains(target)) this.close()
}
}
@@ -1,17 +0,0 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = [ "dialog", "content" ]
connect() {
const width = this.dialogTarget.offsetWidth;
}
toggle() {
const isOpen = this.dialogTarget.open;
if (!isOpen) {
console.log("isOpen");
}
}
}