We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b561d7 commit edeada7Copy full SHA for edeada7
vue/src/components/ProgressBar.vue
@@ -0,0 +1,40 @@
1
+<template>
2
+ <div class="progress-container">
3
+ <div class="progress-bar" :style="{ width: `${percentage}%` }">
4
+ {{ text }} ({{ percentage.toFixed(2) }}%)
5
+ </div>
6
7
+</template>
8
+
9
+<script setup>
10
+defineProps({
11
+ text: {
12
+ type: String,
13
+ required: true,
14
+ },
15
+ percentage: {
16
+ type: Number,
17
+ default: 0,
18
19
+})
20
+</script>
21
22
+<style scoped>
23
+.progress-container {
24
+ width: 100%;
25
+ background-color: #f0f0f0;
26
+ border-radius: 4px;
27
+ overflow: hidden;
28
+ margin-bottom: 8px;
29
+}
30
31
+.progress-bar {
32
+ background-color: #4caf50;
33
+ color: white;
34
+ padding: 4px 8px;
35
+ font-size: 14px;
36
+ white-space: nowrap;
37
38
+ text-overflow: ellipsis;
39
40
+</style>
0 commit comments