import { FC, PropsWithChildren } from 'react' import { StyleSheet } from 'react-native' import { SafeAreaView, SafeAreaViewProps } from 'react-native-safe-area-context' import { KeyboardAwareScrollView, KeyboardAwareScrollViewProps } from '../KeyboardAwareScrollView' import { useScreenOptions } from '@/hooks' type FormWrapperProps = { edges?: SafeAreaViewProps['edges'] headerShown?: boolean keyboardAwareProps?: KeyboardAwareScrollViewProps } export const FormWrapper: FC> = ({ children, edges, headerShown = false, keyboardAwareProps = {}, }) => { useScreenOptions({ headerShown }) return ( {children} ) } const styles = StyleSheet.create({ contentContainerStyle: { alignSelf: 'center', flexGrow: 1, maxWidth: 360 + 2 * 32, // contentWidth + 2 * paddingHorizontal paddingHorizontal: 32, width: '100%', }, safeAreaContainer: { flex: 1 }, })