Files
clinch/app/javascript/controllers/mobile_sidebar_controller.js
Dan Milne 044b9239d6
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Ok - this time add the new controllers we stripped out of inline and add back the csp
2025-11-04 18:55:20 +11:00

21 lines
464 B
JavaScript

import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
static targets = ["sidebarOverlay", "button"];
connect() {
// Initialize mobile sidebar functionality
}
openSidebar() {
if (this.hasSidebarOverlayTarget) {
this.sidebarOverlayTarget.classList.remove('hidden');
}
}
closeSidebar() {
if (this.hasSidebarOverlayTarget) {
this.sidebarOverlayTarget.classList.add('hidden');
}
}
}