From 805c34efcdfe150a5290d8f12d00fdc0424bf290 Mon Sep 17 00:00:00 2001 From: Jacob Lauritzen Date: Mon, 25 Jun 2018 16:23:21 +0200 Subject: [PATCH] Revert back to FACC --- src/CircularProgress.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CircularProgress.js b/src/CircularProgress.js index 4d82035..67682ef 100644 --- a/src/CircularProgress.js +++ b/src/CircularProgress.js @@ -36,8 +36,8 @@ export default class CircularProgress extends React.PureComponent { rotation, lineCap, arcSweepAngle, - renderChild, fill, + children, } = this.props; const backgroundPath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, arcSweepAngle); @@ -81,9 +81,9 @@ export default class CircularProgress extends React.PureComponent { /> - {renderChild && ( + {children && ( - {renderChild(fill)} + {typeof children === 'function' ? children(fill) : children} )} @@ -102,7 +102,10 @@ CircularProgress.propTypes = { rotation: PropTypes.number, lineCap: PropTypes.string, arcSweepAngle: PropTypes.number, - renderChild: PropTypes.func + children: PropTypes.oneOf([ + propTypes.func, + PropTypes.node, + ]), }; CircularProgress.defaultProps = {