Ok - this time add the new controllers we stripped out of inline and add back the csp
This commit is contained in:
21
app/javascript/controllers/mobile_sidebar_controller.js
Normal file
21
app/javascript/controllers/mobile_sidebar_controller.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user