From 4f523b9799f96e06f5e1bf8473489da53c58ba2e Mon Sep 17 00:00:00 2001 From: Yossi Jacob Date: Mon, 6 Feb 2017 22:41:03 +0200 Subject: [PATCH] Allow inner node instead of text inside circle --- Circle.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Circle.js b/Circle.js index f88a136..21182f3 100644 --- a/Circle.js +++ b/Circle.js @@ -35,6 +35,7 @@ export class ProgressCircle extends Component { children: React.PropTypes.node, direction: PropTypes.oneOf(['clockwise', 'counter-clockwise']), formatText: PropTypes.func, + innerNode: PropTypes.func, indeterminate: PropTypes.bool, progress: PropTypes.oneOfType([ PropTypes.number, @@ -86,6 +87,7 @@ export class ProgressCircle extends Component { children, direction, formatText, + innerNode, indeterminate, progress, rotation, @@ -174,15 +176,18 @@ export class ProgressCircle extends Component { justifyContent: 'center', }} > - - {formatText(progressValue)} - + {innerNode ? innerNode(progressValue) : ( + + {formatText(progressValue)} + + )} ) : false} {children}