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.js
2020-08-03 12:04:07 +02:00

25 lines
710 B
JavaScript

const FunctionTabsTop = (props) => {
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
className={`FunctionTabs__nav-link ${(props.slideIndex === index) ? 'FunctionTabs__nav-link-active' : ''}`}
onClick={() => props.setSlideIndex(index)}
>
{tabName}
</a>
</li>
)
})}
</ul>
</div>
</div>
)
}
export default FunctionTabsTop