tracking progress bar

This commit is contained in:
2024-06-02 16:51:06 +02:00
parent 12ad7d36ff
commit 9aa37b355e
3 changed files with 26 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { computed } from 'vue';
interface Props {
value: number;
total: number;
}
const props = defineProps<Props>();
const percentage = computed(() => (props.value / props.total) * 100);
</script>
<template>
<div class="w-full bg-gray-600 rounded-full h-2.5">
<div class="bg-emerald-600 h-2.5 rounded-full" :style="{ width: percentage + '%'}" />
</div>
</template>