@tamagui/react-native-web-lite
Version:
React Native for Web
36 lines (35 loc) • 1.08 kB
JavaScript
import * as React from "react";
import { StyleSheet } from "@tamagui/react-native-web-internals";
import { View } from "../View/index.mjs";
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.mjs.map