import React from 'react'; import { Text, View } from 'react-native'; import PropTypes from 'prop-types'; import Touchable from 'react-native-platform-touchable'; import FastImage from 'react-native-fast-image'; import { themes } from '../../../constants/colors'; import { textParser } from '../utils'; import { CustomIcon } from '../../../lib/Icons'; import styles from './styles'; const keyExtractor = item => item.value.toString(); const Chip = ({ item, onSelect, theme }) => ( onSelect(item)} style={[styles.chip, { backgroundColor: themes[theme].auxiliaryBackground }]} background={Touchable.Ripple(themes[theme].bannerBackground)} > <> {item.imageUrl ? : null} {textParser([item.text])} ); Chip.propTypes = { item: PropTypes.object, onSelect: PropTypes.func, theme: PropTypes.string }; const Chips = ({ items, onSelect, theme }) => ( {items.map(item => )} ); Chips.propTypes = { items: PropTypes.array, onSelect: PropTypes.func, theme: PropTypes.string }; export default Chips;