Nav apraksta

Derechos.js 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import React from "react";
  2. import {
  3. View,
  4. Text,
  5. StyleSheet,
  6. TouchableOpacity,
  7. Linking,
  8. Pressable,
  9. } from "react-native";
  10. import { FlatList, TouchableHighlight } from "react-native-gesture-handler";
  11. import { ButtonLay } from "./Button.js";
  12. import Leyes from "./leyes.json";
  13. import LeyesPR from "./leyesPR.json";
  14. import DerechosAmb from "./derechos.json";
  15. const Derechos = () => {
  16. return (
  17. <>
  18. <View>
  19. <Text style={styles.container2}>1) Leyes de la Tierra</Text>
  20. <View>
  21. {Leyes.map((ley) => {
  22. return (
  23. <>
  24. <TouchableOpacity
  25. style={styles.button}
  26. onPress={() => {
  27. Linking.openURL(ley.link.toString());
  28. }}
  29. >
  30. <Text style={styles.text}>{ley.title}</Text>
  31. </TouchableOpacity>
  32. </>
  33. );
  34. })}
  35. </View>
  36. </View>
  37. <View>
  38. <Text style={styles.container2}>
  39. 2) Derechos del activista climatico
  40. </Text>
  41. <View>
  42. {DerechosAmb.map((der) => {
  43. return (
  44. <>
  45. <TouchableOpacity
  46. style={styles.button}
  47. onPress={() => {
  48. Linking.openURL(der.link.toString());
  49. }}
  50. >
  51. <Text style={styles.text}>{der.title}</Text>
  52. </TouchableOpacity>
  53. </>
  54. );
  55. })}
  56. </View>
  57. </View>
  58. <View>
  59. <Text style={styles.container2}>3) Leyes de Puerto Rico</Text>
  60. <View>
  61. {LeyesPR.map((ley) => {
  62. return (
  63. <>
  64. <TouchableOpacity
  65. style={styles.button}
  66. onPress={() => {
  67. Linking.openURL(ley.link.toString());
  68. }}
  69. >
  70. <Text style={styles.text}>{ley.title}</Text>
  71. </TouchableOpacity>
  72. </>
  73. );
  74. })}
  75. </View>
  76. </View>
  77. </>
  78. );
  79. };
  80. const styles = StyleSheet.create({
  81. container: {
  82. fontSize: 25,
  83. textAlign: "center",
  84. marginTop: "10%",
  85. },
  86. container2: {
  87. fontSize: 25,
  88. textAlign: "left",
  89. marginTop: "10%",
  90. marginLeft: "5%",
  91. },
  92. laws: {
  93. fontSize: 15,
  94. textAlign: "center",
  95. marginTop: "5%",
  96. },
  97. button: {
  98. width: 250,
  99. alignSelf: "center",
  100. alignItems: "center",
  101. justifyContent: "center",
  102. paddingVertical: 12,
  103. paddingHorizontal: 32,
  104. borderRadius: 4,
  105. elevation: 3,
  106. backgroundColor: "#009688",
  107. marginTop: "5%",
  108. },
  109. text: {
  110. fontSize: 16,
  111. lineHeight: 21,
  112. fontWeight: "bold",
  113. letterSpacing: 0.25,
  114. color: "white",
  115. textAlign: "center",
  116. },
  117. });
  118. export default Derechos;