react-native-indicator
Advanced tools
Comparing version 0.4.5 to 0.4.7
@@ -16,2 +16,3 @@ /** | ||
import EatBean from './lib/loader/EatBeanLoader'; | ||
import DoubleCircle from './lib/loader/DoubleCircleLoader'; | ||
@@ -27,2 +28,3 @@ export const PulseLoader = Pulse; | ||
export const MusicBarLoader = Music; | ||
export const EatBeanLoader = EatBean; | ||
export const EatBeanLoader = EatBean; | ||
export const DoubleCircleLoader = DoubleCircle; |
@@ -15,3 +15,4 @@ /** | ||
color: PropTypes.string, | ||
size: PropTypes.number | ||
size: PropTypes.number, | ||
frequency: PropTypes.number | ||
}; | ||
@@ -21,3 +22,4 @@ | ||
color: '#1e90ff', | ||
size: 10 | ||
size: 30, | ||
frequency: 500 | ||
}; | ||
@@ -36,4 +38,4 @@ | ||
return ( | ||
<Surface width={size*2} height={size*2}> | ||
<AnimatedCircle radius={size} fill={color} scale={this.state.scale} x={size} y={size}/> | ||
<Surface width={size} height={size}> | ||
<AnimatedCircle radius={size} fill={color} scale={this.state.scale} x={size/2} y={size/2}/> | ||
</Surface> | ||
@@ -53,4 +55,4 @@ ); | ||
Animated.sequence([ | ||
Animated.timing(this.state.scale, {toValue: 0.2}), | ||
Animated.timing(this.state.scale, {toValue: 1}) | ||
Animated.timing(this.state.scale, {toValue: 0.2, duration: this.props.frequency}), | ||
Animated.timing(this.state.scale, {toValue: 1, duration: this.props.frequency}) | ||
]).start(() => { | ||
@@ -57,0 +59,0 @@ if (!this.unmounted) |
{ | ||
"name": "react-native-indicator", | ||
"version": "0.4.5", | ||
"version": "0.4.7", | ||
"description": "React Native Indicator Component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# react-native-indicator | ||
[](https://www.npmjs.com/package/react-native-indicator)  [](https://github.com/wangdicoder/react-native-indicator) [](https://img.shields.io/badge/npm-3.10.9-red.svg) [](https://www.npmjs.com/package/react-native-indicator) | ||
[](https://www.npmjs.com/package/react-native-indicator)  [](https://github.com/wangdicoder/react-native-indicator) [](https://www.npmjs.com/package/react-native-indicator) | ||
@@ -9,2 +9,3 @@ A useful indicator component for React Native | ||
<img src="/screenshot/ss2.gif" width="372" height="666" /> | ||
<img src="/screenshot/ss3.gif" width="372" height="666" /> | ||
@@ -45,2 +46,3 @@ ## Installation | ||
- EatBeanLoader | ||
- DoubleCircleLoader | ||
@@ -64,4 +66,5 @@ ``` | ||
| ---- | ---- | ---- | ---- | | ||
| size | number | 10 | circle's size | | ||
| size | number | 30 | circle's size | | ||
| color | string | '#1e90ff' | the indicator's color | | ||
| frequency | number | 500 | scale's frequency | | ||
@@ -152,4 +155,12 @@ | ||
##### DoubleCircleLoader | ||
| prop | type | default | description | | ||
| ---- | ---- | ---- | ---- | | ||
| size | number | 30 | circle's size | | ||
| color | string | '#1e90ff' | the indicator's color | | ||
## License | ||
MIT |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
646458
28
814
162
0