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:
parent
321d364f21
commit
65e8456775
1 changed files with 16 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue