Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-progress-loader

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-progress-loader - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "rn-progress-loader",
"version": "1.0.3",
"version": "1.0.4",
"description": "The React Native Native iOS and Android progress indicator (spinner) which acts like an overlay. For those who have issues in iPhoneX while using both Modal and ActivityIndicator, I've made it optional",

@@ -5,0 +5,0 @@ "main": "ProgressLoader.js",

@@ -19,25 +19,34 @@ /**

constructor(props) {
super(props);
this.props = props;
this.state = {
visible: this.props.visible,
isModal:this.props.isModal,
barHeight:this.props.barHeight,
constructor(props) {
super(props);
this.props = props;
this.state = {
visible: this.props.visible,
isModal:this.props.isModal,
color:this.props.color,
barHeight:this.props.barHeight,
isHUD:this.props.isHUD,
hudColor:this.props.hudColor
}
}
}
}
static propTypes = {
visible: PropTypes.bool.isRequired,
isModal: PropTypes.bool.isRequired,
barHeight: PropTypes.number
static propTypes = {
visible: PropTypes.bool.isRequired,
isModal: PropTypes.bool.isRequired,
barHeight: PropTypes.number,
color:PropTypes.string,
hudColor:PropTypes.string,
isHUD:PropTypes.bool
};
};
static defaultProps = {
visible: false,
isModal:true,
barHeight:64
};
static defaultProps = {
visible: false,
isModal:true,
barHeight:64,
color:"#FFFFFF",
hudColor:'#FFFFFF',
isHUD:false
};

@@ -54,8 +63,4 @@

<View style={styles.modalBackground}>
<View style={styles.activityIndicatorWrapper}>
<ActivityIndicator
size="small"
color={"#9b9a99"}
style={{zIndex:100}}
animating={this.props.visible} />
<View style={[styles.activityIndicatorWrapper,{backgroundColor:(this.props.isHUD?(this.props.hudColor):("transparent"))}]}>
{this.renderActivityIndicator()}
</View>

@@ -67,2 +72,21 @@ </View>

renderActivityIndicator(){
const loaderColor = this.props.color;
return(
this.props.isModal?(
<ActivityIndicator
size="small"
color={loaderColor}
style={{zIndex:100}}
animating={this.props.visible} />
):(
<ActivityIndicator
size="small"
color={loaderColor}
style={{zIndex:100,marginBottom:this.props.barHeight}}
animating={this.props.visible} />
)
)
}
renderWithView(){

@@ -73,6 +97,3 @@ return(

>
<ActivityIndicator
size="small"
style={{zIndex:100,marginBottom:this.props.barHeight}}
animating={this.props.visible} />
{this.renderActivityIndicator()}
</View>

@@ -79,0 +100,0 @@ )

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc