improvements on svelte store + handling
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user