feat: add hover card for user list
This commit is contained in:
parent
fd3e758336
commit
d2c4d62cf5
4 changed files with 14 additions and 3 deletions
|
@ -4,6 +4,7 @@ import type { Account } from 'masto'
|
|||
const { account, as = 'div' } = defineProps<{
|
||||
account: Account
|
||||
as?: string
|
||||
hoverCard?: boolean
|
||||
}>()
|
||||
|
||||
defineOptions({
|
||||
|
@ -15,7 +16,9 @@ defineOptions({
|
|||
<!-- This is sometimes (like in the sidebar) used directly as a button, and sometimes, like in follow notifications, as a link. I think this component may need a second refactor that either lets an implementation pass in a link or an action and adapt to what's passed in, or the implementations need to be updated to wrap in the action they want to take and this be just the layout for these items -->
|
||||
<template>
|
||||
<component :is="as" flex gap-3 v-bind="$attrs">
|
||||
<AccountAvatar :account="account" w-12 h-12 />
|
||||
<AccountHoverWrapper :disabled="!hoverCard" :account="account">
|
||||
<AccountAvatar :account="account" w-12 h-12 />
|
||||
</AccountHoverWrapper>
|
||||
<div flex="~ col">
|
||||
<ContentRich font-bold :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
|
||||
<AccountHandle :account="account" text-sm />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue