FoundKey/packages/client/src/components/emoji-picker.section.vue
Chloe Kudryavtsev 8d99f69c90 client: remove _acrylic
Acrylic is defined as having a background
similar to panel + transparency and backdrop.
Simply change everything that is _acrylic to be _panel instead.
2022-08-12 21:25:06 +00:00

36 lines
742 B
Vue

<template>
<section>
<header class="_panel" @click="shown = !shown">
<i class="toggle fa-fw" :class="shown ? 'fas fa-chevron-down' : 'fas fa-chevron-up'"></i> <slot></slot> ({{ emojis.length }})
</header>
<div v-if="shown">
<button
v-for="emoji in emojis"
:key="emoji"
class="_button"
@click="emit('chosen', emoji, $event)"
>
<MkEmoji :emoji="emoji" :normal="true"/>
</button>
</div>
</section>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const props = defineProps<{
emojis: string[];
initialShown?: boolean;
}>();
const emit = defineEmits<{
(ev: 'chosen', v: string, event: MouseEvent): void;
}>();
const shown = ref(!!props.initialShown);
</script>
<style lang="scss" scoped>
</style>