import React, { FC, ReactNode } from 'react';
import { StyleProp, ViewStyle } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';

import { styles } from './styles';

type Props = {
  children: ReactNode;
  style?: StyleProp<ViewStyle>;
};

export const PageWrapper: FC<Props> = ({ children, style }) => {
  return (
    <SafeAreaView style={[styles.wrapper, style]} edges={['top']}>
      {children}
    </SafeAreaView>
  );
};
