partey_workadventure/front/src/Stores/EmoteStore.ts

25 lines
483 B
TypeScript
Raw Normal View History

2021-09-10 16:57:21 +02:00
import { writable } from "svelte/store";
2021-11-09 18:10:55 +01:00
export interface Emoji {
unicode: string;
url: string;
name: string;
}
function createEmoteMenuStore() {
const { subscribe, set } = writable(false);
return {
subscribe,
openEmoteMenu() {
set(true);
},
closeEmoteMenu() {
set(false);
},
};
}
2021-11-09 18:10:55 +01:00
export const emoteStore = writable<Emoji | null>(null);
export const emoteMenuStore = createEmoteMenuStore();