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.

HeaderNavigationButton.js 812B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import React from 'react';
  3. import { TouchableWithoutFeedback } from 'react-native';
  4. import { Icon } from '../../../base/icons';
  5. import styles from './styles';
  6. type Props = {
  7. /**
  8. * Callback to invoke when the {@code HeaderNavigationButton} is clicked/pressed.
  9. */
  10. onPress: Function,
  11. /**
  12. * The ImageSource to be rendered as image.
  13. */
  14. src: Object,
  15. /**
  16. * The component's external style
  17. */
  18. style: Object
  19. }
  20. const HeaderNavigationButton = ({ onPress, src, style }: Props) => (
  21. <TouchableWithoutFeedback
  22. onPress = { onPress } >
  23. <Icon
  24. size = { 20 }
  25. src = { src }
  26. style = { [ styles.headerNavigationButton, style ] } />
  27. </TouchableWithoutFeedback>
  28. );
  29. export default HeaderNavigationButton;