GT2/Ejectable/node_modules/react-native-web/dist/exports/AppRegistry/AppContainer.js

39 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
/**
* Copyright (c) Nicolas Gallagher.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
import StyleSheet from '../StyleSheet';
import View from '../View';
import React, { createContext } from 'react';
var RootTagContext = createContext(null);
export default function AppContainer(props) {
var children = props.children,
WrapperComponent = props.WrapperComponent;
var innerView = React.createElement(View, {
children: children,
key: 1,
pointerEvents: "box-none",
style: styles.appContainer
});
if (WrapperComponent) {
innerView = React.createElement(WrapperComponent, null, innerView);
}
return React.createElement(RootTagContext.Provider, {
value: props.rootTag
}, React.createElement(View, {
pointerEvents: "box-none",
style: styles.appContainer
}, innerView));
}
var styles = StyleSheet.create({
appContainer: {
flex: 1
}
});