Advertisement
raphaelluiz128

filtersitemvelho

Feb 11th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3.  
  4. import { Image, TouchableOpacity, View } from 'react-native';
  5.  
  6. import LinearGradient from 'react-native-linear-gradient';
  7. import Icon from 'react-native-vector-icons/FontAwesome5';
  8.  
  9. import styles from './styles';
  10.  
  11.  
  12. filterEx = () => {
  13. console.warn('acessou');
  14. }
  15. const FiltersItem = ({ imageUrl, active }) => (
  16. <TouchableOpacity onPress={this.filterEx}>
  17. {active && (
  18. <View style={styles.badge}>
  19. <Icon name="check" size={10} color="#fff" />
  20. </View>
  21. )}
  22. <LinearGradient colors={['#7F38F4', '#FD3C29']} style={styles.container}>
  23. {console.tron.log(imageUrl)}
  24. <Image source={imageUrl} />
  25. </LinearGradient>
  26. </TouchableOpacity>
  27. );
  28.  
  29.  
  30. FiltersItem.defaultProps = {
  31. active: null,
  32. imageUrl: '',
  33. };
  34.  
  35. FiltersItem.propTypes = {
  36. imageUrl: PropTypes.number,
  37. active: PropTypes.bool,
  38. };
  39.  
  40. export default FiltersItem;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement