diff --git a/src/CircularProgress.js b/src/CircularProgress.js index 982365f..defda8d 100644 --- a/src/CircularProgress.js +++ b/src/CircularProgress.js @@ -28,9 +28,9 @@ export default class CircularProgress extends React.Component { const { size, width, tintColor, backgroundColor, style, rotation, linecap, children } = this.props; const backgroundPath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, 360 * .9999); - const fill = this.extractFill(this.props.fill); + const fill = this.extractFill(this.props.fill); const circlePath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, (360 * .9999) * fill / 100); - + const offset = size - (width * 2); return ( - { - children && children(fill) - } + {children && + {children} + } ) } @@ -63,7 +74,7 @@ CircularProgress.propTypes = { backgroundColor: PropTypes.string, rotation: PropTypes.number, linecap: PropTypes.string, - children: PropTypes.func + children: PropTypes.object } CircularProgress.defaultProps = {