@@ -99,12 +99,12 @@ export const ComponentTreeToolbar: React.FC = () => {
9999 </ VStack >
100100 ) }
101101 { ! isDesktop && (
102- < VStack
103- align = "start "
104- spacing = { 1 }
105- display = { { base : "block " , [ MESSAGE_BUILDER_MOBILE_BREAKPOINT ] : "none" } }
102+ < HStack
103+ align = "center "
104+ width = "100%"
105+ display = { { base : "flex " , [ MESSAGE_BUILDER_MOBILE_BREAKPOINT ] : "none" } }
106106 >
107- < Text fontSize = "md" display = "inline" >
107+ < Text fontSize = "md" >
108108 Selected:{ " " }
109109 < Text
110110 display = "inline"
@@ -114,56 +114,51 @@ export const ComponentTreeToolbar: React.FC = () => {
114114 { selectedComponent ? getPreviewerComponentLabel ( selectedComponent . type ) : "None" }
115115 </ Text >
116116 </ Text >
117- </ VStack >
117+ < HStack spacing = { 2 } flexWrap = "wrap" >
118+ { selectedComponent && (
119+ < Box >
120+ < AddComponentButton
121+ component = { selectedComponent }
122+ canHaveChildren = { ! ! canAddChildren }
123+ onAddChild = { handleAddChild }
124+ buttonProps = { {
125+ variant : "solid" ,
126+ colorScheme : undefined ,
127+ size : "sm" ,
128+ } }
129+ />
130+ </ Box >
131+ ) }
132+ < Button
133+ leftIcon = { < FaCog /> }
134+ size = "sm"
135+ variant = "solid"
136+ onClick = { ( ) => {
137+ if ( ! selectedComponent ) {
138+ return ;
139+ }
140+
141+ handleConfigureComponent ( ) ;
142+ } }
143+ aria-disabled = { ! selectedComponent }
144+ >
145+ Configure
146+ </ Button >
147+ </ HStack >
148+ </ HStack >
118149 ) }
119- < HStack spacing = { 2 } flexWrap = "wrap" >
120- { isDesktop && (
150+ { isDesktop && (
151+ < HStack spacing = { 2 } flexWrap = "wrap" >
121152 < Button
122153 leftIcon = { < VscCollapseAll /> }
123- size = "sm"
124154 variant = "ghost"
125155 onClick = { handleCollapseAll }
126156 isDisabled = { ! messageComponent }
127157 >
128158 Collapse all
129159 </ Button >
130- ) }
131- { selectedComponent && ! isDesktop && (
132- < Box >
133- < AddComponentButton
134- component = { selectedComponent }
135- canHaveChildren = { ! ! canAddChildren }
136- onAddChild = { handleAddChild }
137- buttonProps = { {
138- variant : "solid" ,
139- colorScheme : undefined ,
140- size : "sm" ,
141- } }
142- />
143- </ Box >
144- ) }
145- { ! isDesktop && (
146- < Button
147- display = { {
148- base : "inline-flex" ,
149- [ MESSAGE_BUILDER_MOBILE_BREAKPOINT ] : "none" ,
150- } }
151- leftIcon = { < FaCog /> }
152- size = "sm"
153- variant = "solid"
154- onClick = { ( ) => {
155- if ( ! selectedComponent ) {
156- return ;
157- }
158-
159- handleConfigureComponent ( ) ;
160- } }
161- aria-disabled = { ! selectedComponent }
162- >
163- Configure
164- </ Button >
165- ) }
166- </ HStack >
160+ </ HStack >
161+ ) }
167162 </ HStack >
168163 </ Box >
169164 < SlidingConfigPanel onClose = { onCloseComponentConfigure } component = { configuringComponent } />
0 commit comments