22 lines
607 B
TypeScript
22 lines
607 B
TypeScript
import {defineStore} from "pinia";
|
|
import {ref} from "vue";
|
|
|
|
export const useDrawerStore = defineStore('drawer', () => {
|
|
const visible = ref(false);
|
|
const transactionType = ref(null)
|
|
const categoryType = ref(null)
|
|
|
|
const setVisible = (isVisible: boolean) => {
|
|
visible.value = isVisible;
|
|
}
|
|
|
|
const setTransactionType = (type: string) => {
|
|
transactionType.value = type;
|
|
}
|
|
|
|
const setCategoryType = (type: string) => {
|
|
categoryType.value = type;
|
|
}
|
|
return {visible, transactionType, categoryType, setTransactionType, setCategoryType, setVisible}
|
|
|
|
}) |