Sharkey/packages/client/src/components/emoji-picker.section.vue
tamaina 7be09a4af9
refactor: Composition APIへ移行 (#8138)
* components/drive-file-thumbnail.vue

* components/drive-select-dialog.vue

* components/drive-window.vue

* wip

* wip drive.file.vue, drive.vue

* fix prop

* wip(

* components/drive.folder.vue

* maybe ok

* ✌️

* fix variable

* FIX FOLDER VARIABLE

* components/emoji-picker-dialog.vue

* Hate `$emit`

* hate global property

* components/emoji-picker-window.vue

* components/emoji-picker.section.vue

* fix

* fixx

* wip components/emoji-picker.vue

* fix

* defineExpose

* ユニコード絵文字の型をもっといい感じに

* components/featured-photos.vue

* components/follow-button.vue

* forgot-password.vue

* forgot-password.vue

* 🎨

* fix
2022-01-18 23:06:16 +09:00

34 lines
737 B
Vue

<template>
<section>
<header class="_acrylic" @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<{
(e: 'chosen', v: string, ev: MouseEvent): void;
}>();
const shown = ref(!!props.initialShown);
</script>
<style lang="scss" scoped>
</style>