import React , { ReactNode } from 'react' ; import { SafeAreaView , View , ViewProps } from 'react-native' ; type ConditionalContainerTypes = { children : ReactNode ; container : ( children : ReactNode ) => ReactNode ; condition : boolean ; } ; export const ConditionalContainer = ( { children , container , condition , } ) => < > { condition ? container ( children ) : children } < />; type IsSafeAreaWrapperProps = { children : ReactNode ; isSafeArea : boolean ; } & ViewProps ; export const IsSafeAreaWrapper = ( { children , isSafeArea , ... props } ) => isSafeArea ? ( < SafeAreaView { ... props } > { children } < /SafeAreaView>) : (<View {...props}>{children}</View > ) ;