Skip to content

Commit edeada7

Browse files
committed
Create progress bar
1 parent 0b561d7 commit edeada7

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

vue/src/components/ProgressBar.vue

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
</div>
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+
overflow: hidden;
38+
text-overflow: ellipsis;
39+
}
40+
</style>

0 commit comments

Comments
 (0)