max support on Progress

Take the max property into consideration when updating the ProgressIndicator
This commit is contained in:
MrYpma 2024-11-13 22:26:06 +01:00 committed by GitHub
parent b7ef4653f7
commit 4fef932f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ const delegatedProps = computed(() => {
>
<ProgressIndicator
class="h-full w-full flex-1 bg-primary transition-all"
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
:style="`transform: translateX(-${100 - (props.modelValue ?? 0) * 100 / (props.max ?? 100)}%);`"
/>
</ProgressRoot>
</template>