Skip to content

Commit

Permalink
[web] Use default Bulma progress bar styles
Browse files Browse the repository at this point in the history
  • Loading branch information
hacketiwack committed Dec 8, 2023
1 parent 7fcc047 commit b2ee4f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
29 changes: 12 additions & 17 deletions web-src/src/components/ProgressBar.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
<template>
<div
v-if="width > 0"
class="progress-bar"
:style="{ width: width_percent }"
<progress
v-if="value > 0"
class="progress is-info"
:value="value"
:max="max"
/>
</template>

<script>
export default {
name: 'ProgressBar',
props: ['max', 'value'],
computed: {
width() {
if (this.value > 0 && this.max > 0) {
return parseInt((this.value * 100) / this.max)
}
return 0
},
width_percent() {
return `${this.width}%`
}
}
props: ['max', 'value']
}
</script>

<style scoped>
.progress {
height: 0.25rem;
}
</style>
6 changes: 0 additions & 6 deletions web-src/src/mystyles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
}
}

.progress-bar {
background-color: $info;
border-radius: 2px;
height: 4px;
}

.media.with-progress h2:last-of-type {
margin-bottom: 6px;
}
Expand Down

0 comments on commit b2ee4f3

Please sign in to comment.