This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

39 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-04-02 02:24:13 +03: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
}
});