react-native-modal
Advanced tools
Comparing version 5.0.1 to 5.1.0-0
{ | ||
"name": "react-native-modal", | ||
"version": "5.0.1", | ||
"version": "5.1.0-0", | ||
"description": "An enhanced React-Native modal", | ||
@@ -37,7 +37,7 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"babel-eslint": "^8.2.1", | ||
"eslint": "^4.18.0", | ||
"babel-eslint": "^8.2.2", | ||
"eslint": "^4.18.1", | ||
"eslint-plugin-react-app": "^3.0.0", | ||
"husky": "0.14.3", | ||
"lint-staged": "^6.1.1", | ||
"lint-staged": "^7.0.0", | ||
"prettier": "^1.10.2", | ||
@@ -44,0 +44,0 @@ "react": ">=15.0.0", |
@@ -48,2 +48,3 @@ import React, { Component } from "react"; | ||
isVisible: PropTypes.bool.isRequired, | ||
hideModalContentWhileAnimating: PropTypes.bool, | ||
onModalShow: PropTypes.func, | ||
@@ -73,2 +74,3 @@ onModalHide: PropTypes.func, | ||
isVisible: false, | ||
hideModalContentWhileAnimating: false, | ||
onBackdropPress: () => null, | ||
@@ -86,2 +88,3 @@ onBackButtonPress: () => null, | ||
state = { | ||
showContent: true, | ||
isVisible: false, | ||
@@ -108,3 +111,3 @@ deviceWidth: Dimensions.get("window").width, | ||
if (!this.state.isVisible && nextProps.isVisible) { | ||
this.setState({ isVisible: true }); | ||
this.setState({ isVisible: true, showContent: true }); | ||
} | ||
@@ -130,3 +133,3 @@ if ( | ||
if (this.props.isVisible) { | ||
this.setState({ isVisible: true }); | ||
this.setState({ isVisible: true, showContent: true }); | ||
} | ||
@@ -329,3 +332,9 @@ } | ||
} else { | ||
this.setState({ isVisible: false }); | ||
this.setState({ | ||
showContent: false | ||
}, () => { | ||
this.setState({ | ||
isVisible: false | ||
}) | ||
}); | ||
this.props.onModalHide(); | ||
@@ -371,2 +380,3 @@ } | ||
const _children = this.props.hideModalContentWhileAnimating && this.props.useNativeDriver &&!this.state.showContent ? <View /> : children; | ||
const containerView = ( | ||
@@ -381,3 +391,3 @@ <View | ||
> | ||
{children} | ||
{_children} | ||
</View> | ||
@@ -401,3 +411,3 @@ ); | ||
{ | ||
backgroundColor: backdropColor, | ||
backgroundColor: this.state.showContent ? backdropColor : 'transparent', | ||
width: deviceWidth, | ||
@@ -404,0 +414,0 @@ height: deviceHeight |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28584
456
1