UNPKG

@tamagui/react-native-web-lite

Version:
21 lines (20 loc) 972 B
import * as React from "react"; import { StyleSheet } from "@tamagui/react-native-web-internals"; import { View } from "../View/index"; import { jsx } from "react/jsx-runtime"; const RootTagContext = React.createContext(null), AppContainer = React.forwardRef((props, forwardedRef) => { const { children, WrapperComponent } = props; let innerView = /* @__PURE__ */ jsx(View, { pointerEvents: "box-none", style: styles.appContainer, children }, 1); return WrapperComponent && (innerView = /* @__PURE__ */ jsx(WrapperComponent, { children: innerView })), /* @__PURE__ */ jsx(RootTagContext.Provider, { value: props.rootTag, children: /* @__PURE__ */ jsx(View, { pointerEvents: "box-none", ref: forwardedRef, style: styles.appContainer, children: innerView }) }); }); AppContainer.displayName = "AppContainer"; const styles = StyleSheet.create({ appContainer: { flex: 1 } }); export { AppContainer, RootTagContext }; //# sourceMappingURL=AppContainer.js.map