Skip to content

Commit 342a009

Browse files
committed
update DotType
1 parent 8a24f5c commit 342a009

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

docs/examples/gap.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class Example extends React.Component<ProgressProps, any> {
7373
strokeWidth={6}
7474
strokeLinecap="square"
7575
strokeColor={color}
76+
dot={{ size: 'p' }}
7677
/>
7778
</div>
7879
<div style={circleContainerStyle}>
@@ -83,6 +84,7 @@ class Example extends React.Component<ProgressProps, any> {
8384
strokeWidth={6}
8485
strokeLinecap="square"
8586
strokeColor={color}
87+
dot={{ size: [] }}
8688
/>
8789
</div>
8890
</div>

docs/examples/gradient-circle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Example = () => {
2020
'0%': '#108ee9',
2121
'100%': '#87d068',
2222
}}
23-
dot={true}
23+
dot={{ size: '10' }}
2424
/>
2525
</div>
2626
<h3>Circle Progress {100}%</h3>
@@ -33,6 +33,7 @@ const Example = () => {
3333
'100%': '#108ee9',
3434
'0%': '#87d068',
3535
}}
36+
dot={{}}
3637
/>
3738
</div>
3839
<h3>Circle With Success Percent {65}%</h3>
@@ -48,7 +49,6 @@ const Example = () => {
4849
'0%': '#87d068',
4950
},
5051
]}
51-
dot={{}}
5252
/>
5353
</div>
5454
</div>

src/Circle.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ const Circle: React.FC<ProgressProps> = ({
126126
/>
127127
);
128128
});
129-
}
130-
return [];
131-
129+
}
130+
return [];
132131
};
133132

134133
const getStokeList = () => {

src/interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface ProgressProps {
1313
gapDegree?: number;
1414
gapPosition?: GapPositionType;
1515
transition?: string;
16-
dot?: dotType;
16+
dot?: DotType;
1717
}
1818

1919
export type StrokeColorType = string | string[] | object;
@@ -22,4 +22,4 @@ export type GapPositionType = 'top' | 'right' | 'bottom' | 'left';
2222

2323
export type StrokeLinecapType = 'round' | 'butt' | 'square';
2424

25-
export type dotType = boolean | object;
25+
export type DotType = boolean | { size: number };

0 commit comments

Comments
 (0)