import * as React from 'react'; import { View, SafeAreaView, ViewProps, ViewStyle, StyleSheet } from 'react-native'; import SafeFilling from '../safe-filling'; export interface SafeAreaProps extends ViewProps { topColor?: string; bottomColor?: string; topInset?: boolean; bottomInset?: boolean; topStyle?: ViewStyle; bottomStyle?: ViewStyle; native?: boolean; style?: ViewStyle; children?: React.ReactNode; } const SafeArea: React.FC = props => { const { topColor, bottomColor, topInset = true, bottomInset, topStyle, bottomStyle, native, style, children, ...restProps } = props; return native ? ( {children} ) : ( {topInset ? : null} {children} {bottomInset ? ( ) : null} ); }; const styles = StyleSheet.create({ container: { flex: 1, }, }); export default SafeArea;