Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 20x 20x 20x 19x | <template>
<div class="flex min-w-0 items-center gap-3">
<UProgress
:model-value="filled"
size="sm"
class="min-w-16 flex-1"
:class="colorClass"
:ui="{ base: 'bg-accented', indicator: 'bg-current' }"
:aria-label="`${percent}% done`"
/>
<span data-figure class="shrink-0 text-highlighted" :class="figureClass">
{{ percent }}<span class="text-sm text-muted">%</span>
</span>
</div>
</template>
<script setup lang="ts">
interface Props {
percent: number;
size?: "md" | "lg";
}
const { percent, size = "md" } = defineProps<Props>();
const filled = computed(() => Math.min(percent, 100));
const colorClass = computed(() => toneClass(progressTone(percent)) || "text-dimmed");
const figureClass = computed(() => (size === "lg" ? "text-2xl" : "text-lg"));
</script>
|