mirror of
https://github.com/tabler/tabler.git
synced 2026-10-13 21:57:00 +04:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
26 lines
746 B
Plaintext
26 lines
746 B
Plaintext
---
|
|
// 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>
|