From 00cb7cef9c3612f72039323c1d66bac4ab4dd892 Mon Sep 17 00:00:00 2001 From: Andrey Petrash Date: Mon, 30 May 2016 12:05:36 +0300 Subject: [PATCH 1/4] update to react-native 0.26 --- Overlay.ios.js | 104 ++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Overlay.ios.js b/Overlay.ios.js index 90ac256..19ae103 100644 --- a/Overlay.ios.js +++ b/Overlay.ios.js @@ -5,69 +5,69 @@ 'use strict'; -var React = require('react-native'); -var { - View, - PropTypes, - StyleSheet, - requireNativeComponent, -} = React; +var React = require('react'); +var {View, StyleSheet, requireNativeComponent} = require('react-native'); type Props = { - isVisible: boolean; + isVisible: boolean } var Overlay = React.createClass({ - propTypes: { - /** - * When this property is set to `true`, the Overlay will appear on - * `UIWindowLevelStatusBar`, otherwise it will appear below that. - */ - aboveStatusBar: React.PropTypes.bool, + propTypes: { + /** + * When this property is set to `true`, the Overlay will appear on + * `UIWindowLevelStatusBar`, otherwise it will appear below that. + */ + aboveStatusBar: React.PropTypes.bool, - /** - * Determines the visibility of the Overlay. When it is not visible, - * an empty View is rendered. - */ - isVisible: React.PropTypes.bool, - }, + /** + * Determines the visibility of the Overlay. When it is not visible, + * an empty View is rendered. + */ + isVisible: React.PropTypes.bool, + }, - getDefaultProps(): Props { - return { - aboveStatusBar: false, - isVisible: false, - } - }, + getDefaultProps(): Props + { + return { + aboveStatusBar: false, + isVisible: false, + } + }, - render() { - var { - isVisible, - } = this.props; - - if (this.props.isVisible) { - return ( - - {React.Children.map(this.props.children, React.cloneElement)} - - ); - } else { - return ; - } - }, + render() + { + if (this.props.isVisible) { + return ( + + { + React.Children.map(this.props.children, React.cloneElement) + } + + ) + ; + } else { + return ; + } + }, }); var RNOverlay = requireNativeComponent('RNOverlay', Overlay); var styles = StyleSheet.create({ - container: { - position: 'absolute', - top: 0, - bottom: 0, - left: 0, - right: 0, - borderWidth: 0, - backgroundColor: 'transparent', - }, -}) + container: { + position: 'absolute', + top: 0, + bottom: 0, + left: 0, + right: 0, + borderWidth: 0, + backgroundColor: 'transparent', + }, +}); -module.exports = Overlay; +module.exports = Overlay; \ No newline at end of file From 32b498eaa007e58ba26deabf13540f91ff010014 Mon Sep 17 00:00:00 2001 From: Aakash Sigdel Date: Fri, 1 Jul 2016 13:05:38 +0545 Subject: [PATCH 2/4] RN upgrade changes to Overlay.ios.js --- Overlay.ios.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Overlay.ios.js b/Overlay.ios.js index 90ac256..dbb1eb7 100644 --- a/Overlay.ios.js +++ b/Overlay.ios.js @@ -5,13 +5,14 @@ 'use strict'; -var React = require('react-native'); +var React = require('react'); +var { PropTypes } = React +var ReactNative = require('react-native') var { View, - PropTypes, StyleSheet, requireNativeComponent, -} = React; +} = ReactNative; type Props = { isVisible: boolean; From 218bfdb96cb12841dbe3100dda971cc82557be4c Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Fri, 8 Jul 2016 10:46:34 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index de76ea4..4724782 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ An `` component that brings content inside to the front of the view r Ideally, no. This should probably only be used as a last resort. You can usually accomplish what you need to by just absolute positioning an view at the bottom of your root component. +*In fact, as of 0.29.0 zIndex is supported on iOS and Android, so you should probably never use this.* + ### Add it to your project 1. Run `npm install react-native-overlay --save` From 73c855b2fdea7fd6289d34a48437daf1cac6c41e Mon Sep 17 00:00:00 2001 From: Aakash Sigdel Date: Fri, 1 Jul 2016 13:05:38 +0545 Subject: [PATCH 4/4] RN upgrade changes to Overlay.ios.js --- Overlay.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Overlay.ios.js b/Overlay.ios.js index 19ae103..048483c 100644 --- a/Overlay.ios.js +++ b/Overlay.ios.js @@ -70,4 +70,4 @@ var styles = StyleSheet.create({ }, }); -module.exports = Overlay; \ No newline at end of file +module.exports = Overlay;