diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx index 2814b8e57..e2449a4ab 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx @@ -13,10 +13,26 @@ import { GridActions } from './gridActions'; import { PanelActions } from './panelActions'; import { GroupActions } from './groupActions'; import { LeftControls, PrefixHeaderControls, RightControls } from './controls'; -import { usePanelApiMetadata } from './debugPanel'; +import { Table, usePanelApiMetadata } from './debugPanel'; + +const DebugContext = React.createContext(false); + +const Option = (props: { + title: string; + onClick: () => void; + value: string; +}) => { + return ( +
+ {`${props.title}: `} + +
+ ); +}; const components = { default: (props: IDockviewPanelProps) => { + const isDebug = React.useContext(DebugContext); const metadata = usePanelApiMetadata(props.api); return ( @@ -24,13 +40,11 @@ const components = { style={{ height: '100%', overflow: 'auto', - color: 'white', position: 'relative', padding: 5, - // border: '5px dashed purple', + border: isDebug ? '2px dashed orange' : '', }} > - {/* */} -
- {'Panel Rendering Mode: '} - {metadata.renderer.value} - -
+ {isDebug && ( +
+
+ + )} ); }, @@ -238,6 +254,7 @@ const DockviewDemo = (props: { theme?: string }) => { }, [gapCheck]); const [showLogs, setShowLogs] = React.useState(false); + const [debug, setDebug] = React.useState(false); return (
{ padding: '4px', }} > +
{showLogs && ( diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx index c8ba04aca..14e0b9aec 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/gridActions.tsx @@ -91,7 +91,6 @@ function usePopover() { export const GridActions = (props: { api?: DockviewApi; - containerRef: HTMLElement; hasCustomWatermark: boolean; toggleCustomWatermark: () => void; }) => {