Skip to content

Commit

Permalink
fix(components): incorrect strokeWidth (#2410)
Browse files Browse the repository at this point in the history
* fix(components): incorrect strokeWidth

* feat(changeset): incorrect strokeWidth in circular progress
  • Loading branch information
wingkwong authored Feb 27, 2024
1 parent cd3b809 commit 0ce1026
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-moons-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/progress": patch
---

fix incorrect strokeWidth in circular progress (#1790)
3 changes: 2 additions & 1 deletion packages/components/progress/src/use-circular-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export function useCircularProgress(originalProps: UseCircularProgressProps) {
const selfMounted = originalProps.disableAnimation ? true : isMounted;

const center = 16;
const strokeWidth = strokeWidthProp || originalProps.size === "sm" ? 2 : 3;
const strokeWidth = strokeWidthProp || (originalProps.size === "sm" ? 2 : 3);

const radius = 16 - strokeWidth;
const circumference = 2 * radius * Math.PI;

Expand Down

0 comments on commit 0ce1026

Please sign in to comment.