import React from 'react'; import { StyleProp, Text, TextStyle, TouchableOpacity, View } from 'react-native'; import styles from './styles'; import { useTheme } from '../../theme'; interface ITabBarProps { goToPage?: (page: number) => void; activeTab?: number; tabs?: string[]; tabEmojiStyle: StyleProp; } const TabBar = React.memo(({ activeTab, tabs, goToPage, tabEmojiStyle }: ITabBarProps) => { const { colors } = useTheme(); return ( {tabs?.map((tab, i) => ( { if (goToPage) { goToPage(i); } }} style={styles.tab} testID={`reaction-picker-${tab}`}> {tab} {activeTab === i ? ( ) : ( )} ))} ); }); export default TabBar;