20 lines
535 B
Vue
20 lines
535 B
Vue
<script setup lang="ts">
|
|
import UserAvatar from '@/components/ui/avatar/UserAvatar.vue';
|
|
import type { UserInfoProps } from '@/types';
|
|
|
|
withDefaults(defineProps<UserInfoProps>(), {
|
|
showEmail: false,
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<UserAvatar :user="user" />
|
|
|
|
<div class="grid flex-1 text-left text-sm leading-tight">
|
|
<span class="truncate font-medium">{{ user.name }}</span>
|
|
<span v-if="showEmail" class="text-muted-foreground truncate text-xs">{{
|
|
user.email
|
|
}}</span>
|
|
</div>
|
|
</template>
|