feat: add htmx server-side plumbing

This commit is contained in:
fromme committed 2026-09-13 14:47:21 +02:00
1 parent 3bfb5afef6
commit ef8a88ed2a
9 files changed
+450

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { Controller } from '@hotwired/stimulus';
/*
* Closes an htmx-loaded modal by removing it from the DOM.
*
* Wired to the backdrop, the X button and a `modal-close` window event, so a fragment swapped
* into the modal can dismiss it with `htmx.trigger(window, 'modal-close')` or an HX-Trigger
* header. Opening is htmx's job; closing never needs a round trip.
*/
export default class extends Controller {
close() {
this.element.remove();
}
}