frontend: FunctionTabs en plusieurs components

This commit is contained in:
Divlo
2020-03-24 09:54:50 +01:00
parent 53330095be
commit b479e1501f
12 changed files with 114 additions and 84 deletions

View File

@ -0,0 +1,16 @@
import React, { createContext, useState } from 'react';
export const FunctionTabsContext = createContext();
function FunctionTabsContextProvider(props) {
const [slideIndex, setSlideIndex] = useState(0);
return (
<FunctionTabsContext.Provider value={{ slideIndex, setSlideIndex }}>
{props.children}
</FunctionTabsContext.Provider>
);
}
export default FunctionTabsContextProvider;