import React from 'react'; import { ImageBackground, StyleSheet, ViewStyle, ImageSourcePropType, } from 'react-native'; export interface BackgroundImageViewProps { /** The image to display in the background of the view */ image: ImageSourcePropType; /**Additional styles or styles to override default style */ style?: ViewStyle | ViewStyle[]; } /** * An image to be displayed on the background of containing view */ const BackgroundImageView: React.FC = ({ style, image, children, ...rest }) => { return ( {children} ); }; const styles = StyleSheet.create({ image: { flex: 1, resizeMode: 'cover', }, }); export default BackgroundImageView;