diff --git a/desktop/plugins/public/ui-debugger/components/main.tsx b/desktop/plugins/public/ui-debugger/components/main.tsx index eb35b3560..632ae8a5e 100644 --- a/desktop/plugins/public/ui-debugger/components/main.tsx +++ b/desktop/plugins/public/ui-debugger/components/main.tsx @@ -53,6 +53,8 @@ export function Component() { setBottomPanelComponent(undefined); }; + const [bottomPanelHeight, setBottomPanelHeight] = useState(400); + if (showPerfStats) return ( - - + - - - + + + + - { - instance.uiActions.setVisualiserWidth(width); - }} - gutter> - - - - - - - {bottomPanelComponent} - - + { + instance.uiActions.setVisualiserWidth(width); + }} + gutter> + + + + + + + {bottomPanelComponent && ( + + {bottomPanelComponent} + + )} + ); } @@ -166,8 +181,15 @@ export function Centered(props: {children: React.ReactNode}) { type BottomPanelProps = { dismiss: () => void; children: React.ReactNode; + height: number; + setHeight: (height: number) => void; }; -export function BottomPanel({dismiss, children}: BottomPanelProps) { +export function BottomPanel({ + dismiss, + children, + height, + setHeight, +}: BottomPanelProps) { const bottomPanelRef = useRef(null); useEffect(() => { @@ -191,9 +213,15 @@ export function BottomPanel({dismiss, children}: BottomPanelProps) { if (!children) { return <>; } + return (
- + setHeight(height)} + gutter> {children}