Nav apraksta

Derechos.js 3.1KB

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