@@ -40,8 +40,8 @@ const Circle: React.FC<ProgressProps> = (props) => {
4040 const perimeter = Math . PI * 2 * radius ;
4141 const rotateDeg = gapDegree > 0 ? 90 + gapDegree / 2 : - 90 ;
4242 const perimeterWithoutGap = perimeter * ( ( 360 - gapDegree ) / 360 ) ;
43- const { count : stepCount , space : stepSpace } =
44- typeof steps === 'object' ? steps : { count : steps , space : 2 } ;
43+ const { count : stepCount , gap : stepGap } =
44+ typeof steps === 'object' ? steps : { count : steps , gap : 2 } ;
4545
4646 const percentList = toArray ( percent ) ;
4747 const strokeColorList = toArray ( strokeColor ) ;
@@ -70,7 +70,7 @@ const Circle: React.FC<ProgressProps> = (props) => {
7070 const getStokeList = ( ) => {
7171 let stackPtg = 0 ;
7272 return percentList
73- . map ( ( ptg , index ) => {
73+ . map < React . ReactNode > ( ( ptg , index ) => {
7474 const color = strokeColorList [ index ] || strokeColorList [ strokeColorList . length - 1 ] ;
7575 const circleStyleForStack = getCircleStyle (
7676 perimeter ,
@@ -119,7 +119,7 @@ const Circle: React.FC<ProgressProps> = (props) => {
119119 const stepPtg = 100 / stepCount ;
120120
121121 let stackPtg = 0 ;
122- return new Array ( stepCount ) . fill ( null ) . map ( ( _ , index ) => {
122+ return new Array ( stepCount ) . fill ( null ) . map < React . ReactNode > ( ( _ , index ) => {
123123 const color = index <= current - 1 ? strokeColorList [ 0 ] : trailColor ;
124124 const stroke = color && typeof color === 'object' ? `url(#${ gradientId } )` : undefined ;
125125 const circleStyleForStack = getCircleStyle (
@@ -133,10 +133,10 @@ const Circle: React.FC<ProgressProps> = (props) => {
133133 color ,
134134 'butt' ,
135135 strokeWidth ,
136- stepSpace ,
136+ stepGap ,
137137 ) ;
138138 stackPtg +=
139- ( ( perimeterWithoutGap - circleStyleForStack . strokeDashoffset + stepSpace ) * 100 ) /
139+ ( ( perimeterWithoutGap - ( circleStyleForStack . strokeDashoffset as number ) + stepGap ) * 100 ) /
140140 perimeterWithoutGap ;
141141
142142 return (
0 commit comments