diff --git a/example/App.js b/example/App.js
index 760e10c..934e55d 100644
--- a/example/App.js
+++ b/example/App.js
@@ -24,13 +24,13 @@ export default class Example extends React.Component {
},
onPanResponderMove: (evt, gestureState) => {
- this.refs.circularProgress.performLinearAnimation(0, 0);
+ this.refs.circularProgress.animate(0, 0);
// For each 2 pixels add or subtract 1 point
this.setState({ pointsDelta: Math.round(-gestureState.dy / 2) });
},
onPanResponderTerminationRequest: (evt, gestureState) => true,
onPanResponderRelease: (evt, gestureState) => {
- this.refs.circularProgress.performLinearAnimation(100, 2000);
+ this.refs.circularProgress.animate(100, 2000);
let points = this.state.points + this.state.pointsDelta;
console.log(Math.min(points, MAX_POINTS));
this.setState({
@@ -55,12 +55,13 @@ export default class Example extends React.Component {
fill={fill}
tintColor="#00e0ff"
backgroundColor="#3d5875"
- renderChild={(fill) => (
+ >
+ {(fill) => (
{ Math.round(MAX_POINTS * fill / 100) }
)}
- />
+
{children && (
- {typeof children === 'function' ? children(fill) : children}
+ {children(fill)}
)}
@@ -102,10 +102,7 @@ CircularProgress.propTypes = {
rotation: PropTypes.number,
lineCap: PropTypes.string,
arcSweepAngle: PropTypes.number,
- children: PropTypes.oneOf([
- propTypes.func,
- PropTypes.node,
- ]),
+ children: PropTypes.func,
};
CircularProgress.defaultProps = {