23 lines
467 B
TypeScript
23 lines
467 B
TypeScript
// Ported from legacy henza_pwa/src/store/windowData.ts.
|
|
import { defineStore } from 'pinia'
|
|
|
|
interface WindowDataState {
|
|
width: number
|
|
pullingDown: boolean
|
|
}
|
|
|
|
export const useWindowDataStore = defineStore('windowData', {
|
|
state: (): WindowDataState => ({
|
|
width: 0,
|
|
pullingDown: false,
|
|
}),
|
|
actions: {
|
|
setWidth(width: number) {
|
|
this.width = width
|
|
},
|
|
setPullingDown(pulling: boolean) {
|
|
this.pullingDown = pulling
|
|
},
|
|
},
|
|
})
|