0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-01 17:32:39 +00:00
VueTube/NUXT/components/Comments/authorCommentBadgeRenderer.vue
2022-04-21 22:51:49 +12:00

41 lines
871 B
Vue

<template>
<div
class="author-comment-badge-renderer"
v-if="metadata && iconTypeMap.hasOwnProperty(metadata.icon.iconType)"
>
<v-tooltip top>
<template v-slot:activator="{ on, attrs }">
<v-icon v-bind="attrs" v-on="on" class="author-badge" small>{{
iconTypeMap[metadata.icon.iconType]
}}</v-icon>
</template>
<span>{{ metadata.iconTooltip }}</span>
</v-tooltip>
</div>
</template>
<script>
export default {
props: {
metadata: {
type: Object,
default: () => ({}),
},
},
data: () => ({
iconTypeMap: {
CHECK: "mdi-check-circle",
CHECK_CIRCLE_THICK: "mdi-check-circle",
OFFICIAL_ARTIST_BADGE: "mdi-music-note",
},
}),
};
</script>
<style scoped>
.author-comment-badge-renderer {
display: flex;
flex-direction: row;
align-items: center;
}
</style>