import React from 'react' import PropTypes from 'prop-types' import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component'; import TabBarItem from './tab_bar_item' /** * Renders a tab bar component * @param {array} [props.tabs] - tab bar data for creating `TabBarItem` * @param {bool} [props.isLarge] - to style the tab bar larger */ class TabBar extends React.PureComponent { render() { const { tabs, isLarge } = this.props return ( { // Check for if tabs exist or not. // We don't `return null` because it maintains 53px height if no tabs. !!tabs && tabs.map((tab, i) => ( )) } ) } } TabBar.propTypes = { tabs: PropTypes.array, isLarge: PropTypes.bool, } export default TabBar