diff --git a/packages/inspector/src/App.tsx b/packages/inspector/src/App.tsx index 956c74f7..f410f307 100644 --- a/packages/inspector/src/App.tsx +++ b/packages/inspector/src/App.tsx @@ -18,6 +18,7 @@ export default function App({ toggleOpen, isSelectMode, toggleSelectMode, + collapseTree, }: { entity: Entity; getSelectedEntity: () => null | Entity; @@ -30,6 +31,7 @@ export default function App({ toggleOpen: () => void; isSelectMode: boolean; toggleSelectMode: () => void; + collapseTree: () => void; }) { let ent = entity; @@ -64,6 +66,7 @@ export default function App({ toggleOpen={toggleOpen} runLoop={runLoop} error={error} + collapseTree={collapseTree} /> ) : null} @@ -78,10 +81,8 @@ export default function App({ right: 0, bottom: 0, width: "33vw", - overflow: "auto", backgroundColor: "rgba(255, 255, 255, 0.75)", boxShadow: "0px 0px 10px rgba(0, 0, 0, 0.5)", - display: "flex", flexDirection: "column", height: "100%", @@ -103,9 +104,10 @@ export default function App({ toggleOpen={toggleOpen} runLoop={runLoop} error={error} + collapseTree={collapseTree} /> ) : null} -
+
; @@ -19,6 +20,7 @@ export default function Controls({ toggleOpen, isSelectMode, toggleSelectMode, + collapseTree, }: { runLoop: RunLoopAPI; error: Error | null; @@ -26,6 +28,7 @@ export default function Controls({ toggleOpen: () => void; isSelectMode: boolean; toggleSelectMode: () => void; + collapseTree: () => void; }) { return (
+ {isOpen && ( + + )} {runLoop.isPaused() ? ( <> - - {label ? ( - - ) : null} - - {className ? ( - - ) : null} - + ▶ +
+ {label && ( + + {label} + + )} + {className && ( + {className} + )} + {expanded ? null : preview} - {expanded ? ( + {expanded && (
{(hasContent ? children : null) || ( {preview} )}
- ) : null} + )}
); } diff --git a/packages/inspector/src/Icons.tsx b/packages/inspector/src/Icons.tsx index a0e71d73..5fa61314 100644 --- a/packages/inspector/src/Icons.tsx +++ b/packages/inspector/src/Icons.tsx @@ -8,8 +8,8 @@ export function PaneRightIcon({ height?: number | string | undefined; } = {}) { /* This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. */ return ( @@ -124,10 +124,9 @@ export function PickEntityIcon({ width?: number | string | undefined; height?: number | string | undefined; } = {}) { - /* -