react-native-image-placeholder
Advanced tools
Comparing version
16
index.js
@@ -1,5 +0,13 @@ | ||
import React from 'react'; | ||
import React, { PropTypes } from 'react'; | ||
import { Image, ActivityIndicator } from 'react-native'; | ||
class ImageLoad extends React.Component { | ||
static propTypes = { | ||
isShowActivity: PropTypes.bool, | ||
}; | ||
static defaultProps = { | ||
isShowActivity: true, | ||
}; | ||
constructor(props) { | ||
@@ -40,7 +48,9 @@ super(props); | ||
{ | ||
this.props.children ? this.props.children : | ||
this.props.children ? this.props.children : | ||
this.props.isShowActivity ? | ||
<ActivityIndicator | ||
size={this.props.loadingStyle ? this.props.loadingStyle.size : 'small'} | ||
color={this.props.loadingStyle ? this.props.loadingStyle.color : 'gray'} | ||
/> | ||
/> : | ||
null | ||
} | ||
@@ -47,0 +57,0 @@ </Image> |
{ | ||
"name": "react-native-image-placeholder", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "react native image placeholder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
639172
0.03%64
14.29%