Skip to content

Commit 4bdef97

Browse files
authored
fix: Progress.Circle properties do not include width (#4352) (#4353)
* fix: Progress.Circle properties do not include width * #4353 - remove default value from width property
1 parent 618e922 commit 4bdef97

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

docs/pages/components/progress/en-US/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ Display the current progress of an operation flow.
5656
| strokeWidth | number `(6)` | Line width |
5757
| trailColor | string | Trail color |
5858
| trailWidth | number `(6)` | Trail width |
59+
| width | number | Circle diameter |

docs/pages/components/progress/zh-CN/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@
5656
| strokeWidth | number `(6)` | 线条宽度 |
5757
| trailColor | string | 背景颜色 |
5858
| trailWidth | number `(6)` | 背景宽度 |
59+
| width | number | 圆直径 |

examples/with-flow/flow-typed/npm/rsuite_v3.x.x.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,7 @@ declare module "rsuite" {
10051005
percent?: number,
10061006
strokeWidth?: number,
10071007
trailWidth?: number,
1008+
width?: number,
10081009
gapDegree?: number,
10091010
gapPosition?: "top" | "bottom" | "left" | "right",
10101011
showInfo?: boolean,
@@ -1020,6 +1021,7 @@ declare module "rsuite" {
10201021
strokeWidth?: number,
10211022
trailColor?: string,
10221023
trailWidth?: number,
1024+
width?: number,
10231025
showInfo?: boolean,
10241026
status?: "success" | "fail" | "active"
10251027
}> {}

src/Progress/ProgressCircle.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export interface ProgressCircleProps extends WithAsProps {
2525
/** Tail width */
2626
trailWidth?: number;
2727

28+
/** Diameter of the circle */
29+
width?: number;
30+
2831
/** Circular progress bar degree */
2932
gapDegree?: number;
3033

@@ -49,6 +52,7 @@ const ProgressCircle: RsRefForwardingComponent<'div', ProgressCircleProps> = Rea
4952
as: Component = 'div',
5053
strokeWidth = 6,
5154
trailWidth = 6,
55+
width,
5256
percent = 0,
5357
strokeLinecap = 'round',
5458
className,
@@ -140,7 +144,7 @@ const ProgressCircle: RsRefForwardingComponent<'div', ProgressCircleProps> = Rea
140144
>
141145
{showInfo ? <span className={prefix('circle-info')}>{info}</span> : null}
142146

143-
<svg className={prefix('svg')} viewBox="0 0 100 100" {...rest}>
147+
<svg className={prefix('svg')} viewBox="0 0 100 100" width={width} {...rest}>
144148
<path
145149
className={prefix('trail')}
146150
d={pathString}
@@ -171,6 +175,7 @@ ProgressCircle.propTypes = {
171175
percent: PropTypes.number,
172176
strokeWidth: PropTypes.number,
173177
trailWidth: PropTypes.number,
178+
width: PropTypes.number,
174179
gapDegree: PropTypes.number,
175180
gapPosition: oneOf(['top', 'bottom', 'left', 'right']),
176181
showInfo: PropTypes.bool,

0 commit comments

Comments
 (0)