New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-animated-overlay

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-animated-overlay - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

animatedoverlay-example/main.js

@@ -37,3 +37,3 @@ import Exponent from 'exponent';

onPress={this.closeOverlay}
showOverlay={this.state.overlayShow}
overlayShow={this.state.overlayShow}
/>

@@ -40,0 +40,0 @@ </View>

{
"name": "react-native-animated-overlay",
"version": "0.0.3",
"version": "0.0.4",
"description": "React Native Animated Overlay support IOS & Android.",

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

@@ -6,2 +6,4 @@ ## React Native Animated Overlay

[Try it with Exponent](https://exp.host/@jacklam718/animatedoverlay-example)
![Example](https://jacklam718.github.io/react-native-animated-overlay/assets/video/react-native-animated-overlay.gif)

@@ -8,0 +10,0 @@

@@ -27,27 +27,18 @@ // @flow

super(props);
const toValue = props.overlayShow ? props.opacity : 0;
this.state = {
opacity: new Animated.Value(0),
opacity: new Animated.Value(toValue),
};
}
componentDidMount() {
if (this.props.overlayShow) {
this.toValue(this.props.opacity);
}
}
componentWillReceiveProps(nextProps) {
if (this.props.overlayShow !== nextProps.overlayShow) {
const toValue = nextProps.overlayShow ? nextProps.opacity : 0;
this.toValue(toValue);
Animated.timing(this.state.opacity, {
toValue,
duration: this.props.animationDuration,
}).start();
}
}
toValue(toValue) {
Animated.timing(this.state.opacity, {
toValue,
duration: this.props.animationDuration,
}).start();
}
render() {

@@ -54,0 +45,0 @@ let { pointerEvents } = this.props;

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