rnc-overlay
v1.0.0
Published
react native overlay
Downloads
1
Readme
react-native-overlay
Usage
'use strict';
var React = require('react-native');
var Overlay = require('rnc-overlay');
var { AppRegistry, StyleSheet, View, Text } = React;
var YApp = React.createClass({
getInitialState() {
return {
isOverlayOpen: true
}
},
closeOverlay() {
this.setState({isOverlayOpen: false});
},
render() {
return (
<View style={styles.page}>
<Overlay onPressBackdrop={this.closeOverlay} isVisible={this.state.isOverlayOpen} Opacity={0.5}/>
</View>
);
}
});
var styles = StyleSheet.create({
page: {
flex: 1,
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
top: 0
}
});
AppRegistry.registerComponent('App', () => App);
##API
Overlay props
MIT Licensed