diff --git a/site/src/components/Select/Select.tsx b/site/src/components/Select/Select.tsx index 43839d9a008c3..3d2f8ffc3b706 100644 --- a/site/src/components/Select/Select.tsx +++ b/site/src/components/Select/Select.tsx @@ -15,10 +15,13 @@ export const SelectValue = SelectPrimitive.Value; export const SelectTrigger = React.forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( + React.ComponentPropsWithoutRef & { + id?: string; + } +>(({ className, children, id, ...props }, ref) => ( void; disabled?: boolean; isPreset?: boolean; + autofill: boolean; } export const DynamicParameter: FC = ({ parameter, + value, onChange, disabled, isPreset, + autofill = false, }) => { const id = useId(); @@ -57,14 +63,31 @@ export const DynamicParameter: FC = ({ className="flex flex-col gap-2" data-testid={`parameter-field-${parameter.name}`} > - +
- + {parameter.form_type === "input" || + parameter.form_type === "textarea" ? ( + + ) : ( + + )}
{parameter.diagnostics.length > 0 && ( @@ -76,10 +99,16 @@ export const DynamicParameter: FC = ({ interface ParameterLabelProps { parameter: PreviewParameter; isPreset?: boolean; + autofill: boolean; + id: string; } -const ParameterLabel: FC = ({ parameter, isPreset }) => { - const hasDescription = parameter.description && parameter.description !== ""; +const ParameterLabel: FC = ({ + parameter, + isPreset, + autofill, + id, +}) => { const displayName = parameter.display_name ? parameter.display_name : parameter.name; @@ -95,7 +124,10 @@ const ParameterLabel: FC = ({ parameter, isPreset }) => { )}
-