E2EE Group Finance Management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
569 B

import { Writable, writable } from "svelte/store";
import type { IToast, IToastStore } from "./types/store.types";
const createToastStore = () => {
const { subscribe, set, update } = writable<IToast>({});
return {
subscribe,
set,
update,
show: (text: string, style?: string) => {
update((x: IToast) => (x = { content: text, style: style || "" }));
},
reset: () => set({}),
};
};
export const toast: IToastStore = createToastStore();
export const currentMember: Writable<string> = writable("");