FoundKey/packages/client/src/components/reaction-tooltip.vue
Johann150 6a3d98fbc1
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed
refactor: remove reaction-icon component
The removed component does not contain any special script or styling.
It's template only contains a MkEmoji. To remove this unnecessary
indirection, the components was replaced with the MkEmoji component.
2022-08-20 16:03:09 +02:00

40 lines
847 B
Vue

<template>
<MkTooltip ref="tooltip" :target-element="targetElement" :max-width="340" @closed="emit('closed')">
<div class="beeadbfb">
<MkEmoji :emoji="reaction" :custom-emojis="emojis" :is-reaction="true" :normal="true" class="icon" :no-style="true"/>
<div class="name">{{ reaction.replace('@.', '') }}</div>
</div>
</MkTooltip>
</template>
<script lang="ts" setup>
import MkTooltip from './ui/tooltip.vue';
defineProps<{
reaction: string;
emojis: Record<string, any>[]; // TODO
targetElement: HTMLElement;
}>();
const emit = defineEmits<{
(ev: 'closed'): void;
}>();
</script>
<style lang="scss" scoped>
.beeadbfb {
text-align: center;
> .icon {
display: block;
width: 60px;
font-size: 60px; // unicodeな絵文字についてはwidthが効かないため
margin: 0 auto;
}
> .name {
font-size: 0.9em;
}
}
</style>