collapse all tables/relationships button

This commit is contained in:
Guy Ben-Aharon
2024-08-23 14:37:46 +03:00
parent c223393e89
commit 7ec8783fb3
4 changed files with 26 additions and 3 deletions

View File

@@ -6,9 +6,11 @@ export type SidebarSection = 'tables' | 'relationships';
export interface LayoutContext {
openedTableInSidebar: string | undefined;
openTableFromSidebar: (tableId: string) => void;
closeAllTablesInSidebar: () => void;
openedRelationshipInSidebar: string | undefined;
openRelationshipFromSidebar: (relationshipId: string) => void;
closeAllRelationshipsInSidebar: () => void;
selectedSidebarSection: SidebarSection;
selectSidebarSection: (section: SidebarSection) => void;
@@ -20,7 +22,9 @@ export const layoutContext = createContext<LayoutContext>({
openedRelationshipInSidebar: undefined,
openRelationshipFromSidebar: emptyFn,
closeAllRelationshipsInSidebar: emptyFn,
selectSidebarSection: emptyFn,
openTableFromSidebar: emptyFn,
closeAllTablesInSidebar: emptyFn,
});