#31 : Fix progress value prop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user