|
@@ -0,0 +1,48 @@
|
|
1
|
+import {
|
|
2
|
+ IonContent,
|
|
3
|
+ IonItem,
|
|
4
|
+ IonLabel,
|
|
5
|
+ IonList,
|
|
6
|
+ IonListHeader,
|
|
7
|
+} from "@ionic/react";
|
|
8
|
+import "../components/ListComponent.css";
|
|
9
|
+
|
|
10
|
+const ListComponent: React.FC<{ title?: string; laws: string[] }> = (props) => {
|
|
11
|
+ const title = props.title;
|
|
12
|
+ const laws = props.laws;
|
|
13
|
+ return (
|
|
14
|
+ <IonContent>
|
|
15
|
+ {title ? (
|
|
16
|
+ <IonListHeader>
|
|
17
|
+ <IonLabel>{title}</IonLabel>
|
|
18
|
+ </IonListHeader>
|
|
19
|
+ ) : null}
|
|
20
|
+
|
|
21
|
+ {laws.map((LawName: string) => {
|
|
22
|
+ return (
|
|
23
|
+ <IonItem href="#">
|
|
24
|
+ <p className="ListItemText">{LawName}</p>
|
|
25
|
+ </IonItem>
|
|
26
|
+ );
|
|
27
|
+ })}
|
|
28
|
+
|
|
29
|
+ {/*
|
|
30
|
+ <IonList className="list" lines="full">
|
|
31
|
+ <IonItem href="#">
|
|
32
|
+ <p className="ListItemText">Ley #1</p>
|
|
33
|
+ </IonItem>
|
|
34
|
+ <IonItem href="#">
|
|
35
|
+ <p className="ListItemText">Ley #1</p>
|
|
36
|
+ </IonItem>
|
|
37
|
+ <IonItem href="#">
|
|
38
|
+ <p className="ListItemText">Ley #1</p>
|
|
39
|
+ </IonItem>
|
|
40
|
+ <IonItem href="#">
|
|
41
|
+ <p className="ListItemText">Ley #1</p>
|
|
42
|
+ </IonItem>
|
|
43
|
+ </IonList>
|
|
44
|
+ */}
|
|
45
|
+ </IonContent>
|
|
46
|
+ );
|
|
47
|
+};
|
|
48
|
+export default ListComponent;
|