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.2KB

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