Address PR feedback
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user