This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/components/FunctionPage/FunctionTabsTop.jsx

29 lines
790 B
React
Raw Normal View History

2020-08-03 14:14:45 +02:00
const FunctionTabsTop = props => {
2020-08-03 12:04:07 +02:00
return (
<div className='container'>
<div className='row justify-content-center'>
<ul className='FunctionTabs__nav'>
{props.tabNames.map((tabName, index) => {
return (
<li key={index} className='FunctionTabs__nav-item'>
<a
2020-08-03 14:14:45 +02:00
className={`FunctionTabs__nav-link ${
props.slideIndex === index
? 'FunctionTabs__nav-link-active'
: ''
}`}
2020-08-03 12:04:07 +02:00
onClick={() => props.setSlideIndex(index)}
>
{tabName}
</a>
</li>
)
})}
</ul>
</div>
</div>
)
}
2020-08-03 12:04:07 +02:00
export default FunctionTabsTop