import React from 'react'; import { ImageBackground, ImageBackgroundProps, StyleProp, StyleSheet, View, ViewStyle, } from 'react-native'; interface OverlayImageStyle extends ViewStyle { overlayColor?: string; } export interface ImageOverlayProps extends ImageBackgroundProps { style?: StyleProp; children?: React.ReactNode; } const DEFAULT_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.45)'; export const ImageOverlay = (props?: ImageOverlayProps): React.ReactElement => { const { style, children, ...imageBackgroundProps } = props; const { overlayColor, ...imageBackgroundStyle } = StyleSheet.flatten(style); return ( {children} ); };