Spaces:
Sleeping
Sleeping
File size: 735 Bytes
7aec436 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
<script>
export let progress = 0;
export let text = '';
</script>
<style>
.progress {
display: flex;
align-items: center;
flex-direction: column;
}
.bar-outer {
width: 200px;
height: 10px;
border: 1px solid currentColor;
margin-bottom: 4px;
background: black;
}
:global([theme="dark"]) .bar-outer {
background: transparent;
}
.bar-inner {
height: 100%;
width: 0;
background: white;
}
.text {
font-style: italic;
}
</style>
<div class="progress">
<div class="bar-outer">
<div
class="bar-inner"
style:width={`${progress * 100}%`}
></div>
</div>
<div class="text">
{text}
</div>
</div>
|