/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/components/cards/ProfileContact.astro
38 строк
1 KB
Paweł Kuna
Narrow component prop types, remove unused props and dead code (#2838)
10 авг 2026, 00:14
Не верифицирован
10 авг 2026, 00:14
4f7beec
Код
Авторство
О чём код?
--- // 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 } const { person } = Astro.props const color = 'yellow' --- <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>