Skip to content

Commit c9d607e

Browse files
authored
Merge pull request #2257 from sendyputra/fix-progress-value-width
fix: improve progress value calculation by rounding to ensure precise…
2 parents 80896d0 + 54125e3 commit c9d607e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/unstyled/progress/src/Progress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const useProgress = ({
1313
}) => {
1414
const valueWidth =
1515
value < max && value > min
16-
? ((value - min) / (max - min)) * 100
16+
? Math.round(((value - min) / (max - min)) * 100)
1717
: value > min
1818
? 100
1919
: 0;

0 commit comments

Comments
 (0)