Keine Beschreibung

calendar.js 1015B

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