12 lines
371 B
TypeScript
12 lines
371 B
TypeScript
import { defineStore } from 'pinia'
|
|
import { ref } from 'vue'
|
|
|
|
export const useAppStore = defineStore('app', () => {
|
|
const sidebarCollapsed = ref(false)
|
|
const loading = ref(false)
|
|
const notifications = ref(3)
|
|
|
|
const toggleSidebar = () => { sidebarCollapsed.value = !sidebarCollapsed.value }
|
|
|
|
return { sidebarCollapsed, loading, notifications, toggleSidebar }
|
|
}) |