Guest User

Untitled

a guest
Feb 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. ////
  2.  
  3. import Modal from "react-native-modalbox";
  4. const { width, height } = Dimensions.get("window");
  5.  
  6. ////
  7.  
  8. renderModal = () => {
  9. let marginTop = height / 2 - 20;
  10.  
  11. let BackgroundView = Platform.OS === "ios" ? BlurView : View;
  12.  
  13. return (
  14. <Modal
  15. style={{
  16. backgroundColor:
  17. Platform.OS === "ios" ? "transparent" : "white",
  18. marginTop: marginTop
  19. }}
  20. ref={ref => (this.modal = ref)}
  21. coverScreen={true}
  22. swipeArea={marginTop + 30}
  23. backdropOpacity={0.0}
  24. backdropPressToClose={true}
  25. swipeToClose={true}
  26. >
  27. <BackgroundView
  28. style={{
  29. flex: 1,
  30. borderRadius: 12,
  31. paddingBottom: marginTop,
  32. justifyContent: "center",
  33. alignItems: "center"
  34. }}
  35. intensity={100}
  36. >
  37. <Text>ABCDEF</Text>
  38. </BackgroundView>
  39. </Modal>
  40. );
  41. };
Add Comment
Please, Sign In to add comment