elk/components/account/AccountAvatar.vue

24 lines
646 B
Vue
Raw Normal View History

<script setup lang="ts">
import type { Account } from 'masto'
defineProps<{
account: Account
2022-11-25 10:54:49 +00:00
hover?: boolean
}>()
2022-11-25 10:54:49 +00:00
defineOptions({
inheritAttrs: false,
})
</script>
<template>
2022-11-25 11:04:35 +00:00
<div v-if="hover" relative flex-shrink-0>
2022-11-25 10:54:49 +00:00
<div group>
2022-11-25 11:04:35 +00:00
<AccountHoverCard top="-3.2" left="-4.4" absolute :account="account" op0 pointer-events-none group-hover="pointer-events-auto op100 scale-100" delay-250 transition transform scale-20 class="ease-[cubic-bezier(0.4, 0.0, 0.2, 1)]" />
<AccountAvatarImage :account="account" v-bind="$attrs" />
2022-11-25 10:54:49 +00:00
</div>
</div>
2022-11-25 11:04:35 +00:00
<AccountAvatarImage v-else :account="account" v-bind="$attrs" />
</template>