improvements on svelte store + handling
This commit is contained in:
parent
e553392d9d
commit
3080e1fdc7
4 changed files with 29 additions and 22 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue