components.wm.contexts.PagePanelContext.tsx Maven / Gradle / Ivy
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}
);
};