Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CustomAgenda.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import * as React from 'react';
  2. import {withTheme} from 'react-native-paper';
  3. import {Agenda} from "react-native-calendars";
  4. /**
  5. * Abstraction layer for Agenda component, using custom configuration
  6. *
  7. * @param props Props to pass to the element. Must specify an onRef prop to get an Agenda ref.
  8. * @return {*}
  9. */
  10. function CustomAgenda(props) {
  11. const {colors} = props.theme;
  12. return (
  13. <Agenda
  14. {...props}
  15. ref={props.onRef}
  16. theme={{
  17. backgroundColor: colors.agendaBackgroundColor,
  18. calendarBackground: colors.background,
  19. textSectionTitleColor: colors.agendaDayTextColor,
  20. selectedDayBackgroundColor: colors.primary,
  21. selectedDayTextColor: '#ffffff',
  22. todayTextColor: colors.primary,
  23. dayTextColor: colors.text,
  24. textDisabledColor: colors.agendaDayTextColor,
  25. dotColor: colors.primary,
  26. selectedDotColor: '#ffffff',
  27. arrowColor: 'orange',
  28. monthTextColor: colors.primary,
  29. indicatorColor: colors.primary,
  30. textDayFontWeight: '300',
  31. textMonthFontWeight: 'bold',
  32. textDayHeaderFontWeight: '300',
  33. textDayFontSize: 16,
  34. textMonthFontSize: 16,
  35. textDayHeaderFontSize: 16,
  36. agendaDayTextColor: colors.agendaDayTextColor,
  37. agendaDayNumColor: colors.agendaDayTextColor,
  38. agendaTodayColor: colors.primary,
  39. agendaKnobColor: colors.primary,
  40. }}
  41. />
  42. );
  43. }
  44. export default withTheme(CustomAgenda);