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.

ActionsDashboardItem.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // @flow
  2. import * as React from 'react';
  3. import {List, withTheme} from 'react-native-paper';
  4. import {View} from 'react-native';
  5. import i18n from 'i18n-js';
  6. import {StackNavigationProp} from '@react-navigation/stack';
  7. import type {CustomTheme} from '../../managers/ThemeManager';
  8. type PropsType = {
  9. navigation: StackNavigationProp,
  10. theme: CustomTheme,
  11. };
  12. class ActionsDashBoardItem extends React.Component<PropsType> {
  13. shouldComponentUpdate(nextProps: PropsType): boolean {
  14. const {props} = this;
  15. return nextProps.theme.dark !== props.theme.dark;
  16. }
  17. render(): React.Node {
  18. const {props} = this;
  19. return (
  20. <View>
  21. <List.Item
  22. title={i18n.t('screens.feedback.homeButtonTitle')}
  23. description={i18n.t('screens.feedback.homeButtonSubtitle')}
  24. left={({size}: {size: number}): React.Node => (
  25. <List.Icon size={size} icon="comment-quote" />
  26. )}
  27. right={({size}: {size: number}): React.Node => (
  28. <List.Icon size={size} icon="chevron-right" />
  29. )}
  30. onPress={(): void => props.navigation.navigate('feedback')}
  31. style={{
  32. paddingTop: 0,
  33. paddingBottom: 0,
  34. marginLeft: 10,
  35. marginRight: 10,
  36. }}
  37. />
  38. </View>
  39. );
  40. }
  41. }
  42. export default withTheme(ActionsDashBoardItem);