UNPKG

react-navigation-drawer

Version:

Drawer navigator component for React Navigation

2 lines 2.18 kB
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/satya/Workspace/Callstack/drawer/src/views/ResourceSavingScene.tsx";import*as React from'react';import{Platform,StyleSheet,View}from'react-native';import{Screen,screensEnabled}from'react-native-screens';var FAR_FAR_AWAY=3000;var ResourceSavingScene=function(_React$Component){_inherits(ResourceSavingScene,_React$Component);function ResourceSavingScene(){_classCallCheck(this,ResourceSavingScene);return _possibleConstructorReturn(this,_getPrototypeOf(ResourceSavingScene).apply(this,arguments));}_createClass(ResourceSavingScene,[{key:"render",value:function render(){if(screensEnabled&&screensEnabled()){var _this$props=this.props,_isVisible=_this$props.isVisible,_rest=_objectWithoutProperties(_this$props,["isVisible"]);return React.createElement(Screen,_extends({active:_isVisible?1:0},_rest,{__source:{fileName:_jsxFileName,lineNumber:21}}));}var _this$props2=this.props,isVisible=_this$props2.isVisible,children=_this$props2.children,style=_this$props2.style,rest=_objectWithoutProperties(_this$props2,["isVisible","children","style"]);return React.createElement(View,_extends({style:[styles.container,style],collapsable:false,removeClippedSubviews:Platform.OS==='ios'?!isVisible:true,pointerEvents:isVisible?'auto':'none'},rest,{__source:{fileName:_jsxFileName,lineNumber:26}}),React.createElement(View,{style:isVisible?styles.attached:styles.detached,__source:{fileName:_jsxFileName,lineNumber:37}},children));}}]);return ResourceSavingScene;}(React.Component);export{ResourceSavingScene as default};var styles=StyleSheet.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:FAR_FAR_AWAY}}); //# sourceMappingURL=ResourceSavingScene.js.map