File tree 2 files changed +17
-11
lines changed
pages/CreateWorkspacePage
2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 3
3
createContext ,
4
4
type FC ,
5
5
type HTMLProps ,
6
- type PropsWithChildren ,
7
6
useContext ,
8
7
ReactNode ,
8
+ ComponentProps ,
9
9
} from "react" ;
10
10
import { AlphaBadge , DeprecatedBadge } from "components/Badges/Badges" ;
11
11
import { Stack } from "components/Stack/Stack" ;
@@ -135,11 +135,14 @@ export const FormSection: FC<FormSectionProps> = ({
135
135
) ;
136
136
} ;
137
137
138
- export const FormFields : FC < PropsWithChildren > = ( { children } ) => {
138
+ export const FormFields : FC < ComponentProps < typeof Stack > > = ( props ) => {
139
139
return (
140
- < Stack direction = "column" spacing = { 3 } css = { styles . formSectionFields } >
141
- { children }
142
- </ Stack >
140
+ < Stack
141
+ direction = "column"
142
+ spacing = { 3 }
143
+ { ...props }
144
+ css = { styles . formSectionFields }
145
+ />
143
146
) ;
144
147
} ;
145
148
Original file line number Diff line number Diff line change @@ -256,11 +256,14 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
256
256
title = "Parameters"
257
257
description = "These are the settings used by your template. Please note that immutable parameters cannot be modified once the workspace is created."
258
258
>
259
- { /*
260
- Opted not to use FormFields in order to increase spacing.
261
- This decision was made because rich parameter inputs are more visually dense than standard text fields.
262
- */ }
263
- < div css = { { display : "flex" , flexDirection : "column" , gap : 36 } } >
259
+ { /* The parameter fields are densely packed and carry significant information,
260
+ /* hence they require additional vertical spacing for better
261
+ /*readability and user experience. */ }
262
+ < FormFields
263
+ css = { {
264
+ gap : 36 ,
265
+ } }
266
+ >
264
267
{ parameters . map ( ( parameter , index ) => {
265
268
const parameterField = `rich_parameter_values.${ index } ` ;
266
269
const parameterInputName = `${ parameterField } .value` ;
@@ -285,7 +288,7 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
285
288
/>
286
289
) ;
287
290
} ) }
288
- </ div >
291
+ </ FormFields >
289
292
</ FormSection >
290
293
) }
291
294
You can’t perform that action at this time.
0 commit comments