// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import {StyleSheet, View} from 'react-native'; import Tab from './tab'; import type {TabDefinition} from '.'; type Props = { tabs: Array>; selectedTab: T; onTabChange: (tabId: T) => void; testID?: string; }; const styles = StyleSheet.create({ menuContainer: { alignItems: 'center', flexGrow: 1, flexDirection: 'row', paddingLeft: 12, marginVertical: 12, overflow: 'hidden', }, }); export default function Tabs({ tabs, selectedTab, onTabChange, testID, }: Props) { const tabsComponents = tabs.map(({name, id, requiresUserAttention, count}) => { const isSelected = selectedTab === id; return ( ); }); return ( {tabsComponents} ); }