improvements on svelte store + handling

This commit is contained in:
Lurkars 2021-09-12 11:11:52 +02:00
parent e553392d9d
commit 3080e1fdc7
4 changed files with 29 additions and 22 deletions

View file

@ -1,4 +1,18 @@
import { writable } from "svelte/store";
function createEmoteMenuStore() {
const { subscribe, set } = writable(false);
return {
subscribe,
openEmoteMenu() {
set(true);
},
closeEmoteMenu() {
set(false);
},
};
}
export const emoteStore = writable<string | null>(null);
export const emoteMenuStore = writable(false);
export const emoteMenuStore = createEmoteMenuStore();