/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
docs/components/DocsCard.astro
38 строк
992 B
Paweł Kuna
Enable `astro/tsconfigs/strictest` in the docs package (#2835)
08 авг 2026, 01:51
Не верифицирован
08 авг 2026, 01:51
512ede5
Код
Авторство
О чём код?
--- import Icon from '@ui/Icon.astro' interface Props { /** When omitted, the card renders as a non-interactive "Coming soon" tile. */ href?: string icon?: string | undefined title: string description: string } const { href, icon, title, description }: Props = Astro.props const Tag = href ? 'a' : 'div' --- <div class="col-md-6"> <Tag href={href} class:list={['card', !href && 'bg-surface-tertiary']}> <div class="card-body"> <div class="position-relative"> {!href && <span class="badge position-absolute top-0 end-0">Coming soon</span>} <div class="row"> { icon && ( <div class="col-auto"> <Icon name={icon} class="text-secondary" /> </div> ) } <div class="col"> <div class="h3">{title}</div> <p class="text-secondary m-0 fs-4 lh-base">{description}</p> </div> </div> </div> </div> </Tag> </div>