Revert back to FACC

This commit is contained in:
Jacob Lauritzen 2018-06-25 16:23:21 +02:00
parent 11f9464ab3
commit 805c34efcd

View File

@ -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 {
/>
</G>
</Svg>
{renderChild && (
{children && (
<View style={childContainerStyle}>
{renderChild(fill)}
{typeof children === 'function' ? children(fill) : children}
</View>
)}
</View>
@ -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 = {