@@ -1,6 +1,8 @@
|
||||
<script>
|
||||
export let total = 0
|
||||
export let used = 0
|
||||
export let animation = "ease"
|
||||
export let speed = 1000
|
||||
let percent = 0
|
||||
$: {
|
||||
// Avoid division by 0
|
||||
@@ -18,7 +20,7 @@ $: {
|
||||
</script>
|
||||
|
||||
<div class="progress_bar_outer">
|
||||
<div class="progress_bar_inner" style="width: {percent}%;"></div>
|
||||
<div class="progress_bar_inner" style="width: {percent}%; transition-timing-function: {animation}; transition-duration: {speed}ms;"></div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -26,13 +28,16 @@ $: {
|
||||
display: block;
|
||||
background: var(--background_color);
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
height: 6px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
margin: 6px 0 12px 0;
|
||||
}
|
||||
.progress_bar_inner {
|
||||
background: var(--highlight_background);
|
||||
height: 100%;
|
||||
width: 0;
|
||||
transition: width 1s;
|
||||
border-radius: 6px;
|
||||
transition-property: width;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user