2024-01-18 11:13:05 +00:00
|
|
|
<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>
|
|
|
|
|
2024-04-04 20:13:35 +00:00
|
|
|
<style scoped lang="postcss">
|
2024-01-18 11:13:05 +00:00
|
|
|
img {
|
|
|
|
border-radius: 50%;
|
|
|
|
aspect-ratio: 1/1;
|
|
|
|
background: var(--color-bg-primary);
|
2024-03-19 22:48:12 +00:00
|
|
|
object-fit: cover;
|
2024-01-18 11:13:05 +00:00
|
|
|
}
|
|
|
|
</style>
|