Socket
Socket
Sign inDemoInstall

react-native-overlay

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-overlay - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

26

Examples/Toast/index.ios.js

@@ -23,8 +23,13 @@ /**

getInitialState(): any {
return {isToastVisible: true};
return {isTopToastVisible: true, isBottomToastVisible: true};
},
hideToast() {
this.setState({isToastVisible: false});
hideTopToast() {
this.setState({isTopToastVisible: false});
},
hideBottomToast() {
this.setState({isBottomToastVisible: false});
},
render() {

@@ -34,3 +39,3 @@ return (

{ /* It doesn't matter where we put this component */ }
<Toast isVisible={this.state.isToastVisible} onDismiss={this.hideToast} position="bottom">
<Toast isVisible={this.state.isBottomToastVisible} onDismiss={this.hideBottomToast} position="bottom">
<TouchableOpacity onPress={() => { AlertIOS.alert('Pressed on text!') }}>

@@ -41,8 +46,18 @@ <Text style={styles.toastText}>This message is easy to display and dismiss! Write as much as you want to, also! It will just flow down.</Text>

{ /*
<TouchableOpacity onPress={() => { AlertIOS.alert('Pressed on image!') }}>
<Image source={require('image!announcement')} style={styles.image} />
</TouchableOpacity>
*/ }
<View style={{marginTop: 200}}>
<View style={{}}>
<Text style={{color: '#ffffff'}}>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</Text>
</View>
</View>
{ /* It doesn't matter where we put this component */ }
<Toast isVisible={this.state.isToastVisible} onDismiss={this.hideToast} position="top">
<Toast isVisible={this.state.isTopToastVisible} onDismiss={this.hideTopToast} position="top">
<TouchableOpacity onPress={() => { AlertIOS.alert('Pressed on text!') }}>

@@ -60,2 +75,3 @@ <Text style={styles.toastText}>This message is easy to display and dismiss! Write as much as you want to, also! It will just flow down.</Text>

flex: 1,
backgroundColor: 'black',
},

@@ -62,0 +78,0 @@ toastText: {

7

Examples/Toast/Toast.ios.js

@@ -34,3 +34,3 @@ /**

<Overlay isVisible={this.props.isVisible} aboveStatusBar={false}>
<BlurView style={positionStyle} blurType="light">
<View style={positionStyle} blurType="light">
<View style={styles.content}>

@@ -45,3 +45,3 @@ {this.props.children}

</TouchableOpacity>
</BlurView>
</View>
</Overlay>

@@ -57,2 +57,3 @@ );

alignItems: 'center',
backgroundColor: 'darkred',
},

@@ -66,2 +67,3 @@ bottom: {

alignItems: 'center',
backgroundColor: 'navy',
},

@@ -83,3 +85,2 @@ content: {

dismissButtonText: {
color: '#888888',
fontSize: 12,

@@ -86,0 +87,0 @@ },

@@ -59,2 +59,3 @@ /**

right: 0,
backgroundColor: 'transparent',
},

@@ -61,0 +62,0 @@ })

{
"name": "react-native-overlay",
"version": "0.1.3",
"version": "0.1.4",
"description": "An <Overlay /> component that brings content inside to the front of the view regardless of its current position in the component tree.",

@@ -5,0 +5,0 @@ "main": "Overlay.ios.js",

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