react-native-circular-progress
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "react-native-circular-progress", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "React Native component for creating animated, circular progress with ReactART", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -75,2 +75,3 @@ # react-native-circular-progress | ||
- **friction** - the friction value for the spring animation (see [here](https://facebook.github.io/react-native/docs/animations.html#core-api)) | ||
- **linecap** - the shape to be used at the ends of the circle. Possible values: butt (default), round or square. (see [here](https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-linecap)) | ||
- **children(fill)** - you can pass function as a child to receive current fill | ||
@@ -77,0 +78,0 @@ |
@@ -35,3 +35,3 @@ import React, { PropTypes } from 'react'; | ||
render() { | ||
const { size, width, tintColor, backgroundColor, style, rotation, children } = this.props; | ||
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); | ||
@@ -54,3 +54,3 @@ | ||
strokeWidth={width} | ||
strokeCap="butt"/> | ||
strokeCap={linecap}/> | ||
</Group> | ||
@@ -74,2 +74,3 @@ </Surface> | ||
rotation: PropTypes.number, | ||
linecap: PropTypes.string, | ||
children: PropTypes.func | ||
@@ -81,3 +82,4 @@ } | ||
backgroundColor: '#e4e4e4', | ||
rotation: 90 | ||
rotation: 90, | ||
linecap: 'butt' | ||
} |
370960
136
99