diff --git a/.changeset/tricky-moons-obey.md b/.changeset/tricky-moons-obey.md new file mode 100644 index 0000000000..68a18a818e --- /dev/null +++ b/.changeset/tricky-moons-obey.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/progress": patch +--- + +fix incorrect strokeWidth in circular progress (#1790) diff --git a/packages/components/progress/src/use-circular-progress.ts b/packages/components/progress/src/use-circular-progress.ts index 6d8adf6a36..e8d8131af0 100644 --- a/packages/components/progress/src/use-circular-progress.ts +++ b/packages/components/progress/src/use-circular-progress.ts @@ -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;