initial commit
This commit is contained in:
21
app/stores/burger.ts
Normal file
21
app/stores/burger.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useBurgerStore = defineStore('burger', {
|
||||
state: () => ({
|
||||
checked: false as boolean,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
toggle() {
|
||||
this.checked = !this.checked
|
||||
},
|
||||
|
||||
open() {
|
||||
this.checked = true
|
||||
},
|
||||
|
||||
close() {
|
||||
this.checked = false
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user