1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 15:35:22 +02:00

Functions to show, hide, and handle menu.

This commit is contained in:
Claude Ayitey 2024-01-03 19:47:49 +00:00
parent 321d364f21
commit 65e8456775

View file

@ -4,3 +4,19 @@ export default class extends Controller {
static targets = [ "menu" ]
static values = {isOpen: { type: Boolean, default: false }}
connect(){}
menu() {
this.isOpenValue ? this.hide() : this.show()
this.isOpenValue = !this.isOpenValue
}
show() {
this.menuTarget.style.display = "block"
}
hide() {
this.menuTarget.style.display = "none"
}
}