Socket
Socket
Sign inDemoInstall

react-native-modal

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-modal - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "react-native-modal",
"version": "3.0.1",
"version": "3.0.2",
"description": "An enhanced React-Native modal",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -75,3 +75,2 @@ # react-native-modal

| backdropTransitionOutTiming | number | 300 | The backdrop hide timing (in ms) |
| hideOnBack | bool | true | Hide the modal on back button press? |
| onBackButtonPress | func | () => null | Called when the Android back button is pressed |

@@ -78,0 +77,0 @@ | onBackdropPress | func | () => null | Called when the backdrop is pressed |

@@ -26,4 +26,2 @@ import React, { Component } from 'react';

onModalHide: PropTypes.func,
hideOnBack: PropTypes.bool,
hideOnBackdropPress: PropTypes.bool,
onBackButtonPress: PropTypes.func,

@@ -46,4 +44,2 @@ onBackdropPress: PropTypes.func,

isVisible: false,
hideOnBack: false,
hideOnBackdropPress: false,
onBackdropPress: () => null,

@@ -120,17 +116,2 @@ onBackButtonPress: () => null,

_closeOnBack = () => {
if (this.props.hideOnBack) {
this._close();
}
this.props.onBackButtonPress();
};
_closeOnBackdrop = () => {
if (this.props.hideOnBackdropPress) {
this._close();
}
this.props.onBackdropPress();
};
render() {

@@ -149,3 +130,4 @@ const {

onModalShow,
onModalHide,
onBackdropPress,
onBackButtonPress,
style,

@@ -160,6 +142,6 @@ ...otherProps

visible={this.state.isVisible}
onRequestClose={this._closeOnBack}
onRequestClose={onBackButtonPress}
{...otherProps}
>
<TouchableWithoutFeedback onPress={this._closeOnBackdrop}>
<TouchableWithoutFeedback onPress={onBackdropPress}>
<View

@@ -166,0 +148,0 @@ ref={ref => (this.backdropRef = ref)}

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