inhaus-plugin-chat/resources/js/components/EmojiPicker.vue
Friederich Loheide 2844452002 Nachrichten-Plugin 1.0.0: Direktnachrichten, Gruppen, Anhänge, GIFs, Emojis
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 16:34:53 +00:00

28 lines
1.2 KiB
Vue

<script setup>
import { ref } from 'vue';
import { EMOJI_GROUPS } from '../lib/emojis';
const emit = defineEmits(['pick']);
const group = ref(0);
</script>
<template>
<div>
<div class="ih:flex ih:border-b ih:px-1" role="tablist" aria-label="Emoji-Gruppen">
<button
v-for="(g, i) in EMOJI_GROUPS"
:key="g.label"
type="button"
role="tab"
:aria-selected="group === i"
:title="g.label"
class="ih:grid ih:size-9 ih:place-items-center ih:text-lg ih:transition-opacity"
:class="group === i ? 'ih:border-b-2 ih:border-brand' : 'ih:opacity-60 ih:hover:opacity-100'"
@click="group = i"
>{{ g.icon }}</button>
</div>
<div class="ih:grid ih:max-h-60 ih:grid-cols-8 ih:gap-0.5 ih:overflow-y-auto ih:p-2" role="tabpanel" :aria-label="EMOJI_GROUPS[group].label">
<button v-for="emoji in EMOJI_GROUPS[group].emojis" :key="emoji" type="button" class="ih:grid ih:aspect-square ih:place-items-center ih:rounded ih:text-xl ih:hover:bg-accent" :aria-label="emoji" @click="emit('pick', emoji)">{{ emoji }}</button>
</div>
</div>
</template>