import React from 'react'; import PropTypes from 'prop-types'; import { View, TouchableOpacity, Text } from 'react-native'; import styles from './styles'; export default class TabBar extends React.PureComponent { static propTypes = { goToPage: PropTypes.func, activeTab: PropTypes.number, tabs: PropTypes.array, tabEmojiStyle: PropTypes.object } render() { return ( {this.props.tabs.map((tab, i) => ( this.props.goToPage(i)} style={styles.tab} testID={`reaction-picker-${ tab }`} > {tab} {this.props.activeTab === i ? : } ))} ); } }