contexts.MenuContext.js Maven / Gradle / Ivy
import { createContext } from 'react';
import { isFunction } from 'lodash'
export const MenuItemContext = createContext();
const MenuItemProvider = ({children, menu}) => {
const handleMenu = isFunction(menu) ? menu : () => menu
return (
{children}
)
}
export default MenuItemProvider;