import React from 'react'; import { StatusBar, StatusBarStyle, StyleProp, ViewStyle } from 'react-native'; import color from 'color'; import { AppTheme } from '../../styles/theme'; import { Layout } from '../Layout'; import { SnackBarWrapper } from '../SnackBar'; import { ThemeProvider } from '../../core/theming'; import type { Theme } from '../../types'; import { View } from '../View'; export type Props = { style?: StyleProp; children?: React.ReactNode; appBackgroundColor?: string; statusBarStyle?: StatusBarStyle; statusBarColor?: string; insetTop: boolean; insetBottom: boolean; theme?: Theme; }; const AppWrapper = (props: Props) => { const { theme = AppTheme, style, appBackgroundColor, statusBarStyle = 'light-content', statusBarColor, insetBottom = false, insetTop = false, children, } = props; const handleSnackBar = (ref: any) => SnackBarWrapper.setRef(ref); const statusBarBackground = statusBarColor ? statusBarColor : color(theme?.colors?.primary).darken(0.3).hex(); const backgroundColor = appBackgroundColor ? appBackgroundColor : theme?.colors?.background; return ( {children} ); }; export default AppWrapper;