2021-02-26 22:08:34 -06:00
|
|
|
<template>
|
2021-12-16 11:14:40 -06:00
|
|
|
<MkModal ref="modal" v-slot="{ type, maxHeight }" :manual-showing="manualShowing" :src="src" :front="true" @click="$refs.modal.close()" @opening="opening" @close="$emit('close')" @closed="$emit('closed')">
|
|
|
|
<MkEmojiPicker ref="picker" class="ryghynhb _popup _shadow" :class="{ drawer: type === 'drawer' }" :show-pinned="showPinned" :as-reaction-picker="asReactionPicker" :as-drawer="type === 'drawer'" :max-height="maxHeight" @chosen="chosen"/>
|
|
|
|
</MkModal>
|
2021-02-26 22:08:34 -06:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent, markRaw } from 'vue';
|
2021-12-16 11:14:40 -06:00
|
|
|
import MkModal from '@/components/ui/modal.vue';
|
2021-11-11 11:02:25 -06:00
|
|
|
import MkEmojiPicker from '@/components/emoji-picker.vue';
|
2021-02-26 22:08:34 -06:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2021-12-16 11:14:40 -06:00
|
|
|
MkModal,
|
2021-02-26 22:08:34 -06:00
|
|
|
MkEmojiPicker,
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
2021-02-27 10:09:59 -06:00
|
|
|
manualShowing: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: null,
|
|
|
|
},
|
2021-02-26 22:08:34 -06:00
|
|
|
src: {
|
|
|
|
required: false
|
|
|
|
},
|
|
|
|
showPinned: {
|
|
|
|
required: false,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
asReactionPicker: {
|
|
|
|
required: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-08-07 22:19:10 -05:00
|
|
|
emits: ['done', 'close', 'closed'],
|
2021-02-26 22:08:34 -06:00
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
chosen(emoji: any) {
|
|
|
|
this.$emit('done', emoji);
|
2021-12-16 11:14:40 -06:00
|
|
|
this.$refs.modal.close();
|
2021-02-26 22:08:34 -06:00
|
|
|
},
|
2021-02-27 19:03:52 -06:00
|
|
|
|
|
|
|
opening() {
|
|
|
|
this.$refs.picker.reset();
|
|
|
|
this.$refs.picker.focus();
|
|
|
|
}
|
2021-02-26 22:08:34 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-08-09 04:01:12 -05:00
|
|
|
.ryghynhb {
|
2021-12-16 11:14:40 -06:00
|
|
|
&.drawer {
|
|
|
|
border-radius: 24px;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
2021-02-26 22:08:34 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|