22 lines
321 B
TypeScript
22 lines
321 B
TypeScript
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
|
|
},
|
|
},
|
|
})
|