Skip to content

Commit

Permalink
fix(progress): render dot when percentage is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Feb 17, 2022
1 parent 1b38eb0 commit d481552
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/progress/Progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,19 @@ const Progress = forwardRef((props: ProgressProps, ref: React.Ref<HTMLDivElement
stroke={trackColor}
fill="none"
></circle>
<circle
cx={circleCenterInViewBox}
cy={circleCenterInViewBox}
r={radius}
strokeWidth={circleStokeWidth}
fill="none"
transform={`matrix(0,-1,1,0,0,${diameter + circleStokeWidth})`}
strokeDasharray={strokeDasharray}
className={`${classPrefix}-progress__circle-inner`}
style={circlePathStyle}
></circle>
{percentage > 0 && (
<circle
cx={circleCenterInViewBox}
cy={circleCenterInViewBox}
r={radius}
strokeWidth={circleStokeWidth}
fill="none"
transform={`matrix(0,-1,1,0,0,${diameter + circleStokeWidth})`}
strokeDasharray={strokeDasharray}
className={`${classPrefix}-progress__circle-inner`}
style={circlePathStyle}
></circle>
)}
</svg>
</div>
);
Expand Down

0 comments on commit d481552

Please sign in to comment.