/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/components/cards/UserCardBig.astro
30 строк
694 B
Paweł Kuna
Enable `astro/tsconfigs/strictest` in the shared package (#2836)
08 авг 2026, 02:27
Не верифицирован
08 авг 2026, 02:27
e520b32
Код
Авторство
О чём код?
--- import Avatar from '@ui/Avatar.astro' import people from '@data/people.json' import { requireIndex } from '@shared/lib/array' interface Person { full_name?: string job_title?: string photo?: string [key: string]: unknown } interface Props { personId?: number } const { personId = 0 } = Astro.props const person = requireIndex(people as Person[], personId) --- <div class="card"> <div class="card-body text-center"> <div class="mb-3"> <Avatar size="xl" person={person} /> </div> <h3 class="card-title mb-1">{person.full_name}</h3> <div class="text-secondary">{person.job_title}</div> </div> <a href="#" class="card-btn">View full profile</a> </div>