#31 : Fix progress value prop

This commit is contained in:
Vadim
2021-07-03 14:02:59 +03:00
parent 7ace64b0a1
commit 76766e9568

View File

@@ -5,11 +5,11 @@
const MAX_PERCENT = 100;
/**
* Progress value
* Progress value, [0, 1]
*/
export let value = 0
$: width = Math.max(value * MAX_PERCENT, 0)
$: width = Math.min(Math.max(value * MAX_PERCENT, 0), MAX_PERCENT)
</script>
<div