React Native backgroundColor overlay over image - Stack Overflow

PHOTO EMBED

Sat Aug 08 2020 04:06:55 GMT+0000 (Coordinated Universal Time)

Saved by @rdemo #javascript

render() {
  return (
    <View style={styles.container}>
      <Image source={require('./assets/climbing_mountain.jpeg')} style={styles.imageContainer}>
      </Image>
      <View style={styles.overlay} />
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    width: null,
    height: null,
  },
  imageContainer: {
    flex: 1,
    width: null,
    height: null,
  },
  overlay: {
    ...StyleSheet.absoluteFillObject,
    backgroundColor: 'rgba(69,85,117,0.7)',
  }
})
content_copyCOPY

https://stackoverflow.com/questions/41626402/react-native-backgroundcolor-overlay-over-image