diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.module.css b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.module.css index 74b0f64c9..366e6be25 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.module.css +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.module.css @@ -4,20 +4,3 @@ height: 100%; background-color: var(--global-background); } - -.toolbarWrapper { - position: absolute; - left: 0; - bottom: 2rem; - right: 0; - display: grid; - justify-content: center; - margin: 0 auto; - /* NOTE: Disable pointer events to allow interaction with Reactflow underneath the toolbar */ - pointer-events: none; -} - -/* NOTE: Make the toolbar itself clickable */ -.toolbarWrapper > * { - pointer-events: auto; -} diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx index eb326fc1d..b5aac0934 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx @@ -13,7 +13,6 @@ import { type FC, useCallback, useEffect } from 'react' import styles from './ERDContent.module.css' import { RelationshipEdge } from './RelationshipEdge' import { TableNode } from './TableNode' -import { Toolbar } from './Toolbar' import { useAutoLayout } from './useAutoLayout' import { useFitViewWhenActiveTableChange } from './useFitViewWhenActiveTableChange' @@ -185,9 +184,6 @@ export const ERDContent: FC = ({ gap={16} /> -
- -
) } diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.module.css b/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.module.css index e1e930e3f..6d257d415 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.module.css +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.module.css @@ -23,3 +23,20 @@ left: 8px; z-index: 1; } + +.toolbarWrapper { + position: absolute; + left: 0; + bottom: 2rem; + right: 0; + display: grid; + justify-content: center; + margin: 0 auto; + /* NOTE: Disable pointer events to allow interaction with Reactflow underneath the toolbar */ + pointer-events: none; +} + +/* NOTE: Make the toolbar itself clickable */ +.toolbarWrapper > * { + pointer-events: auto; +} diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.tsx b/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.tsx index eca75c086..20fd6869f 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.tsx +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDRenderer.tsx @@ -12,6 +12,8 @@ import styles from './ERDRenderer.module.css' import { LeftPane } from './LeftPane' import '@/styles/globals.css' import { useDBStructureStore, useUserEditingStore } from '@/stores' +// biome-ignore lint/nursery/useImportRestrictions: Fixed in the next PR. +import { Toolbar } from './ERDContent/Toolbar' import { TableDetailDrawer, TableDetailDrawerRoot } from './TableDetailDrawer' import { convertDBStructureToNodes } from './convertDBStructureToNodes' @@ -37,6 +39,9 @@ export const ERDRenderer: FC = () => { +
+ +