import React from 'react';
import {StyleProp, ViewStyle} from 'react-native';
import {KeyboardAvoidingView} from 'react-native-keyboard-controller';
import {commonStyles} from '@shared/styles';

interface Props {
  children: React.ReactNode;
  style?: StyleProp<ViewStyle>;
}

export function Content({children, style}: Props) {
  return (
    <KeyboardAvoidingView style={[commonStyles.flex, style]} behavior="padding">
      {children}
    </KeyboardAvoidingView>
  );
}
