Files
tabler/shared/components/cards/ProfileContact.astro
T
codecalm f27c70ad38 Fix Prettier formatting regression and Astro type-check errors
`Render Modal as real markup` (#2742) reformatted ~140 files back to
tabs/semicolons, breaking the Prettier config added by the Astro
quality gates (#2749). Re-run prettier --write to restore it, and fix
the type errors it had been masking: HTMLElement casts and `this`
typing in ChangePasswordModalContent/ConfirmDeleteModalContent
scripts, plain-JS syntax in the inline-injected progress.astro script,
narrowed prop unions in Button/Check/Spinner, nullable icon svg casts
in Icons/Rating, and a duplicate firstLetters/invalid `placeholder`
attribute in Select.astro. Also fix shared/vitest.config.mts's stale
`astro/lib/**/*.test.ts` include glob left over from the shared source
restructure, which made `pnpm test` report zero test files.
2026-08-03 01:26:19 +02:00

39 lines
1.4 KiB
Plaintext

---
// TODO: fallback to people[1] when person omitted — unused on card-gradients, so `person` is required here.
import Icon from '@ui/Icon.astro'
import Avatar from '@ui/Avatar.astro'
import ButtonList from '@ui/ButtonList.astro'
interface Person {
full_name?: string
job_title?: string
[key: string]: unknown
}
interface Props {
person: Person
color?: string
}
const { person, color = 'yellow' } = Astro.props
---
<div class={`card card-gradient card-gradient-${color}`}>
<div class="card-body text-center py-6">
<div class="position-absolute top-0 end-0 p-1">
<div class="btn btn-action"><Icon name="star" color="yellow" type="filled" /></div>
</div>
<div>
<Avatar size="2xl" person={person} shape="rounded-circle" />
</div>
<div class="h1 mt-4 mb-1">{person.full_name}</div>
<div class="text-secondary">{person.job_title}</div>
<ButtonList class="justify-content-center mt-3">
<a href="#" class="btn btn-icon btn-pill" title="Message" data-bs-toggle="tooltip" data-bs-placement="top"><Icon name="message" /></a>
<a href="#" class="btn btn-icon btn-pill" title="Phone" data-bs-toggle="tooltip" data-bs-placement="top"><Icon name="phone" /></a>
<a href="#" class="btn btn-icon btn-pill" title="Email" data-bs-toggle="tooltip" data-bs-placement="top"><Icon name="mail" /></a>
</ButtonList>
</div>
</div>