Skip to content

Instantly share code, notes, and snippets.

@pushkar100
Created April 12, 2022 06:45
Show Gist options
  • Select an option

  • Save pushkar100/b2883b30d420a77acaee6a4be4c6e5c0 to your computer and use it in GitHub Desktop.

Select an option

Save pushkar100/b2883b30d420a77acaee6a4be4c6e5c0 to your computer and use it in GitHub Desktop.
import React from "react";
export const MenuContext = React.createContext({ hideButtons: false });
const Menu = ({ children, hideButtons }) => {
return (
<MenuContext.Provider value={{ hideButtons }}>
{children}
</MenuContext.Provider>
);
};
export default Menu;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment