/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/ui/ProgressDescription.astro
25 строк
746 B
Paweł Kuna
Narrow component prop types, remove unused props and dead code (#2838)
10 авг 2026, 00:14
Не верифицирован
10 авг 2026, 00:14
4f7beec
Код
Авторство
О чём код?
--- // Forward `size` only when explicitly provided. import Progress from './Progress.astro' import type { ProgressSize } from './Progress.astro' interface Props { label?: string description?: string value?: number | string color?: string size?: ProgressSize | undefined class?: string } const { label = 'Label', description, value, color = 'blue', size, class: className } = Astro.props --- <div class:list={[className]}> <div class="d-flex mb-1 align-items-center lh-1"> <div class="fs-5 fw-semibold m-0">{label}</div> {description && <div class="fs-6 text-secondary ms-2">{description}</div>} <span class="ms-auto fs-6 strong">{value}%</span> </div> <Progress size={size} value={value} color={color} /> </div>