File tree Expand file tree Collapse file tree
editor/scaffolds/inspector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,17 @@ import {
1010import { useTargetContainer } from "hooks/use-target-node" ;
1111import { IRadius } from "@reflect-ui/core" ;
1212import { InspectLayout } from "./inspect-layout" ;
13+ import {
14+ Collapsible ,
15+ CollapsibleTrigger ,
16+ CollapsibleContent ,
17+ } from "@radix-ui/react-collapsible" ;
18+
19+ import { ChevronUpIcon , ChevronDownIcon } from "@radix-ui/react-icons" ;
1320
1421export function LayoutSection ( ) {
1522 const { target, root } = useTargetContainer ( ) ;
23+ const [ inspectorOpen , setInspectorOpen ] = React . useState ( false ) ;
1624
1725 if ( ! target ) {
1826 return < > </ > ;
@@ -71,7 +79,21 @@ export function LayoutSection() {
7179 ) }
7280 </ PropertyLines >
7381 < PropertyLines padding = { 0 } >
74- < InspectLayout />
82+ < Collapsible open = { inspectorOpen } onOpenChange = { setInspectorOpen } >
83+ < CollapsibleTrigger asChild >
84+ < PropertyGroupHeader >
85+ < h6 > Inspect Layout</ h6 >
86+ { inspectorOpen ? (
87+ < ChevronUpIcon color = "white" />
88+ ) : (
89+ < ChevronDownIcon color = "white" />
90+ ) }
91+ </ PropertyGroupHeader >
92+ </ CollapsibleTrigger >
93+ < CollapsibleContent >
94+ < InspectLayout />
95+ </ CollapsibleContent >
96+ </ Collapsible >
7597 </ PropertyLines >
7698 </ PropertyGroup >
7799 ) ;
You can’t perform that action at this time.
0 commit comments