|
@@ -1,17 +1,41 @@
|
1
|
|
-import * as React from 'react';
|
2
|
|
-import { StyleSheet, View, Text } from 'react-native';
|
|
1
|
+import React, { useState } from 'react';
|
|
2
|
+import { StyleSheet, View, Text, TouchableOpacity, Modal } from 'react-native';
|
3
|
3
|
import Header from '../shared/header';
|
|
4
|
+import Calendar from 'react-native-calendars/src/calendar';
|
|
5
|
+import { Agenda, calendarTheme } from 'react-native-calendars';
|
4
|
6
|
|
5
|
|
-export default function Calendario({navigation}) {
|
6
|
|
- return (
|
7
|
|
- <View style={styles.container}>
|
8
|
|
- <Text>Calendario Screen</Text>
|
|
7
|
+export default function Calendario({ navigation }) {
|
|
8
|
+ const [items, setItems] = useState({
|
|
9
|
+ '2022-12-06': [{name: 'matricula'}],
|
|
10
|
+ '2022-12-07': [{name: 'seguir metiendole mano al sprint 🥵'}],
|
|
11
|
+ '2022-12-08': [],
|
|
12
|
+ });
|
|
13
|
+
|
|
14
|
+ function renderItem(item) {
|
|
15
|
+ return (
|
|
16
|
+ <View>
|
|
17
|
+ <Text style={[styles.item, {height: item.height}]}>{item.name}</Text>
|
9
|
18
|
</View>
|
10
|
|
- )
|
|
19
|
+ );
|
|
20
|
+ }
|
|
21
|
+
|
|
22
|
+ return (
|
|
23
|
+ <Agenda
|
|
24
|
+ items={items}
|
|
25
|
+ renderItem={renderItem}
|
|
26
|
+ />
|
|
27
|
+ );
|
11
|
28
|
}
|
12
|
29
|
|
13
|
30
|
const styles = StyleSheet.create({
|
14
|
31
|
container: {
|
15
|
32
|
padding: 24
|
|
33
|
+ },
|
|
34
|
+ item: {
|
|
35
|
+ backgroundColor: 'white',
|
|
36
|
+ flex: 1,
|
|
37
|
+ padding: 15,
|
|
38
|
+ marginRight: 10,
|
|
39
|
+ marginTop: 32
|
16
|
40
|
}
|
17
|
41
|
});
|