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/FunctionTabs/FunctionTabs.js

19 lines
585 B
JavaScript
Raw Normal View History

import { useContext } from 'react';
import { FunctionTabsContext } from '../../contexts/FunctionTabsContext';
import SwipeableViews from 'react-swipeable-views';
import './FunctionTabs.css';
function FunctionTabs(props) {
const { setSlideIndex, slideIndex } = useContext(FunctionTabsContext);
return (
<div className="container-fluid">
<SwipeableViews onChangeIndex={(index) => setSlideIndex(index)} index={slideIndex} enableMouseEvents>
{props.children}
</SwipeableViews>
</div>
);
}
export default FunctionTabs;