import { createContext, PropsWithChildren, useContext } from 'react'; import { Widget, WidgetBody } from '@@/Widget'; const Context = createContext(null); export function useTableContext() { const context = useContext(Context); if (context == null) { throw new Error('Should be nested inside a TableContainer component'); } } export function TableContainer({ children }: PropsWithChildren) { return (
{children}
); }