edit table from canvas

This commit is contained in:
Guy Ben-Aharon
2024-08-21 10:05:37 +03:00
parent 4ede0f3117
commit d4da127de6
7 changed files with 88 additions and 21 deletions

View File

@@ -0,0 +1,18 @@
import { emptyFn } from '@/lib/utils';
import { createContext } from 'react';
export type SidebarSection = 'tables' | 'relationships';
export interface LayoutContext {
openedTableInSidebar: string | undefined;
openTableFromSidebar: (tableId: string) => void;
selectedSidebarSection: SidebarSection;
selectSidebarSection: (section: SidebarSection) => void;
}
export const layoutContext = createContext<LayoutContext>({
openedTableInSidebar: undefined,
selectedSidebarSection: 'tables',
selectSidebarSection: emptyFn,
openTableFromSidebar: emptyFn,
});