Environment.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import React from 'react';
  2. import { View, Text, StyleSheet } from 'react-native';
  3. export default class Environment {
  4. constructor(CS) {
  5. this.CoreSystem = CS;
  6. }
  7. render() {
  8. return <View style={styles.container}>
  9. <View style={styles.row}>
  10. <Text>Row</Text>
  11. </View>
  12. <View style={styles.row}>
  13. <View style={styles.col}>
  14. <Text>Col</Text>
  15. </View>
  16. <View style={[styles.mobileView, styles.col]}>
  17. {this.CoreSystem.render()}
  18. </View>
  19. <View style={styles.col}>
  20. <Text>Col</Text>
  21. </View>
  22. </View>
  23. <View style={styles.row}>
  24. <Text>row</Text>
  25. </View>
  26. </View>
  27. }
  28. }
  29. const styles = StyleSheet.create({
  30. container: {
  31. flex: 1,
  32. flexDirection: "column"
  33. },
  34. mobileView: {
  35. backgroundColor: 'white',
  36. borderWidth: 4,
  37. borderColor: 'orange',
  38. flex:1,
  39. alignSelf: 'stretch',
  40. // iphone X
  41. width:1125/3,
  42. height: 2436/3
  43. },
  44. row: {
  45. flexDirection: "row",
  46. borderWidth: 1
  47. },
  48. col: {
  49. flexDirection: "column",
  50. borderWidth: 1
  51. }
  52. });