import * as React from 'react' import { KeyboardAvoidingView, Platform, ScrollView, StatusBar, View } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { ScreenProps } from './screen.props' import { isNonScrolling, offsets, presets } from './screen.presets' const isIos = Platform.OS === 'ios' function ScreenWithoutScrolling(props: ScreenProps) { const insets = useSafeAreaInsets() const preset = presets.fixed const style = props.style || {} const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {} const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top } return ( {props.children} ) } function ScreenWithScrolling(props: ScreenProps) { const insets = useSafeAreaInsets() const preset = presets.scroll const style = props.style || {} const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {} const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top } return ( {props.children} ) } /** * The starting component on every screen in the app. * * @param props The screen props */ export function Screen(props: ScreenProps) { if (isNonScrolling(props.preset)) { return } else { return } }