gab-social/app/javascript/gabsocial/components/tab_bar.js

22 lines
499 B
JavaScript
Raw Normal View History

2020-02-22 23:26:23 +00:00
import TabBarItem from './tab_bar_item'
export default class TabBar extends PureComponent {
static propTypes = {
tabs: PropTypes.array,
2020-02-28 15:20:47 +00:00
large: PropTypes.bool,
2020-02-22 23:26:23 +00:00
}
render() {
2020-02-28 15:20:47 +00:00
const { tabs, large } = this.props
2020-02-22 23:26:23 +00:00
return (
2020-03-11 23:56:18 +00:00
<div className={[_s.default, _s.height53PX, _s.px5, _s.flexRow].join(' ')}>
2020-02-28 15:20:47 +00:00
{ !!tabs &&
2020-02-22 23:26:23 +00:00
tabs.map((tab, i) => (
2020-02-28 15:20:47 +00:00
<TabBarItem key={`tab-bar-item-${i}`} {...tab} large={large} />
2020-02-22 23:26:23 +00:00
))
}
</div>
)
}
}