All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.wm.contexts.PagePanelContext.tsx Maven / Gradle / Ivy

There is a newer version: 0.80.3
Show newest version
import React, { createContext, useState } from 'react';
import { SetState } from 'types/react';

export type PagePanelButtonType = {
  id: string;
  component: React.ReactNode;
};
type PagePanelProps = {
  buttons: PagePanelButtonType[];
  setButtons: SetState;
};

export const PagePanelContext = createContext({} as PagePanelProps);

export const PagePanelProvider = ({ children }: { children: React.ReactNode; }): JSX.Element => {
  const [buttons, setButtons] = useState([]);

  return (
    
      
        {children}
      
    
  );
};






© 2015 - 2024 Weber Informatics LLC | Privacy Policy