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;
|
|
|
|
}
|
|
|
|
|
2021-09-12 11:11:52 +02:00
|
|
|
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);
|
2021-09-12 11:11:52 +02:00
|
|
|
export const emoteMenuStore = createEmoteMenuStore();
|