diff --git a/front/src/Components/EmoteMenu/EmoteMenu.svelte b/front/src/Components/EmoteMenu/EmoteMenu.svelte index 854a04b2..d69eded5 100644 --- a/front/src/Components/EmoteMenu/EmoteMenu.svelte +++ b/front/src/Components/EmoteMenu/EmoteMenu.svelte @@ -4,7 +4,8 @@ import { emoteStore, emoteMenuStore } from "../../Stores/EmoteStore"; import { onDestroy, onMount } from "svelte"; import { EmojiButton } from '@joeattardi/emoji-button'; - + import { isMobile } from "../../Enum/EnvironmentVariable"; + let emojiContainer: HTMLElement; let picker: EmojiButton; @@ -16,7 +17,8 @@ styleProperties: { '--font': 'Press Start 2P' }, - autoFocusSearch : false + emojisPerRow: isMobile() ? 6 : 8, + autoFocusSearch: false }); picker.on("emoji", (selection) => { @@ -36,6 +38,12 @@ }) }) + function onKeyDown(e:KeyboardEvent) { + if (e.key === 'Escape') { + emoteMenuStore.closeEmoteMenu(); + } + } + onDestroy(() => { if (unsubscriber) { unsubscriber(); @@ -46,6 +54,8 @@ + +
diff --git a/front/style/style.scss b/front/style/style.scss index 859794bd..7584a4b5 100644 --- a/front/style/style.scss +++ b/front/style/style.scss @@ -1105,4 +1105,13 @@ div.is-silent.hide { .emote-menu .emoji-picker .emoji-picker__emoji { font-family: "Twemoji Mozilla" !important; +} + +div.emoji-picker { + background-color: #333; + border-radius: 1em; + + input.emoji-picker__search { + border-radius: 1em; + } } \ No newline at end of file