Skip to content

Commit 9964c4b

Browse files
onchainguy-btcoblador
authored andcommitted
Implement fill property for Circle (#122)
1 parent 0590494 commit 9964c4b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Circle.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class ProgressCircle extends Component {
2525
color: PropTypes.string,
2626
children: PropTypes.node,
2727
direction: PropTypes.oneOf(['clockwise', 'counter-clockwise']),
28+
fill: PropTypes.string,
2829
formatText: PropTypes.func,
2930
indeterminate: PropTypes.bool,
3031
progress: PropTypes.oneOfType([
@@ -79,6 +80,7 @@ export class ProgressCircle extends Component {
7980
color,
8081
children,
8182
direction,
83+
fill,
8284
formatText,
8385
indeterminate,
8486
progress,
@@ -132,6 +134,7 @@ export class ProgressCircle extends Component {
132134
>
133135
{unfilledColor && progressValue !== 1 ? (
134136
<Shape
137+
fill={fill}
135138
radius={radius}
136139
offset={offset}
137140
startAngle={angle}
@@ -145,6 +148,7 @@ export class ProgressCircle extends Component {
145148
)}
146149
{!indeterminate ? (
147150
<Shape
151+
fill={fill}
148152
radius={radius}
149153
offset={offset}
150154
startAngle={0}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ All of the props under *Properties* in addition to the following:
7777
|**`textStyle`**|Styles for progress text, defaults to a same `color` as circle and `fontSize` proportional to `size` prop. |*None*|
7878
|**`direction`**|Direction of the circle `clockwise` or `counter-clockwise`. |`clockwise`|
7979
|**`strokeCap`**|Stroke Cap style for the circle `butt`, `square` or `round`. |`butt`|
80+
|**`fill`**|Fill color of the inner circle. |None (transparent)|
8081

8182
### `Progress.Pie`
8283

0 commit comments

Comments
 (0)