Sharkey/packages/frontend/src/components/MkEmojiPickerWindow.vue

42 lines
822 B
Vue
Raw Normal View History

<template>
<MkWindow ref="window"
2023-01-07 07:44:50 +02:00
:initial-width="300"
:initial-height="290"
:can-resize="true"
:mini="true"
:front="true"
@closed="emit('closed')"
>
2023-01-07 07:44:50 +02:00
<MkEmojiPicker :show-pinned="showPinned" :as-reaction-picker="asReactionPicker" as-window @chosen="chosen" :class="$style.picker"/>
</MkWindow>
</template>
<script lang="ts" setup>
import { } from 'vue';
import MkWindow from '@/components/MkWindow.vue';
import MkEmojiPicker from '@/components/MkEmojiPicker.vue';
withDefaults(defineProps<{
src?: HTMLElement;
showPinned?: boolean;
asReactionPicker?: boolean;
}>(), {
showPinned: true,
});
const emit = defineEmits<{
(ev: 'chosen', v: any): void;
(ev: 'closed'): void;
}>();
function chosen(emoji: any) {
emit('chosen', emoji);
}
</script>
2023-01-07 07:44:50 +02:00
<style lang="scss" module>
.picker {
height: 100%;
}
</style>