safetwitch/src/components/ChatBadge.vue

30 lines
438 B
Vue
Raw Normal View History

2023-03-30 10:30:21 -04:00
<script lang="ts">
interface Badge {
2023-03-31 07:50:46 -04:00
id: string
title: string
setId: string
version: string
images: { [k: string]: string }
2023-03-30 10:30:21 -04:00
}
export default {
props: {
badgeInfo: {
2023-03-31 07:50:46 -04:00
type: Object
2023-03-30 10:30:21 -04:00
}
},
setup(props) {
const data = props.badgeInfo as Badge
return {
src: data.images.image1x,
name: data.title
}
}
}
</script>
<template>
2023-03-31 07:50:46 -04:00
<img :src="src" class="w-3.5 h-3.5 rounded-sm" />
2023-03-30 10:30:21 -04:00
</template>