Advertisement
Felanpro

React Native (ViewImageScreen)

May 15th, 2023
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. import React from 'react';
  2. import { Image, StyleSheet, View } from 'react-native';
  3.  
  4. function ViewImageScreen(props) {
  5. return (
  6.  
  7. <View style = {styles.container}>
  8.  
  9. <View style = {styles.closeIcon}></View>
  10. <View style = {styles.deleteIcon}></View>
  11.  
  12. <Image resizeMode = "contain" style = {styles.image} source={require('../assets/chair.jpg')}></Image>
  13.  
  14. </View>
  15. );
  16. }
  17.  
  18. const styles = StyleSheet.create({
  19. image: {
  20. width: "100%",
  21. height: "100%",
  22. },
  23. container: {
  24. backgroundColor: "#000",
  25. flex: 1
  26. },
  27. closeIcon: {
  28. width: 50,
  29. height: 50,
  30. backgroundColor: "#fc5c65",
  31. position: "absolute",
  32. top: 40,
  33. left: 30
  34. },
  35. deleteIcon: {
  36. width: 50,
  37. height: 50,
  38. backgroundColor: "#4ecdc4",
  39. position: "absolute",
  40. top: 40,
  41. right: 30
  42. }
  43. })
  44.  
  45. export default ViewImageScreen;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement