koel/resources/assets/js/components/user/UserAvatar.vue
2024-07-06 17:44:57 +02:00

19 lines
418 B
Vue

<template>
<img :alt="`Avatar of ${user.name}`" :src="user.avatar" :title="user.name">
</template>
<script setup lang="ts">
import { toRefs } from 'vue'
const props = defineProps<{ user: Pick<User, 'name' | 'avatar'> }>()
const { user } = toRefs(props)
</script>
<style scoped lang="postcss">
img {
border-radius: 50%;
aspect-ratio: 1/1;
background: var(--color-bg-primary);
object-fit: cover;
}
</style>