/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/ui/ProgressBg.astro
22 строки
625 B
Paweł Kuna
Narrow component prop types, remove unused props and dead code (#2838)
10 авг 2026, 00:14
Не верифицирован
10 авг 2026, 00:14
4f7beec
Код
Авторство
О чём код?
--- import Progress from './Progress.astro' import { parsePercentage } from '@shared/lib/string-format' interface Props { value?: number | string color?: string class?: string text?: string showValue?: boolean } const { value, color = 'primary-lt', class: className, text, showValue } = Astro.props const percentage = parsePercentage(value) --- <div class={`progressbg${className ? ` ${className}` : ''}`}> <Progress value={percentage} class="progressbg-progress" color={color} /> {text && <div class="progressbg-text">{text}</div>} {showValue && <div class="progressbg-value">{percentage}%</div>} </div>