[7/n][project settings ui] env var cleanup start (#35)

This commit is contained in:
Vivian Phung 2024-05-14 16:19:32 -04:00 committed by GitHub
commit e1c4f77ec1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,10 +19,10 @@ const AddEnvironmentVariableRow = ({
isDeleteDisabled, isDeleteDisabled,
}: AddEnvironmentVariableRowProps) => { }: AddEnvironmentVariableRowProps) => {
return ( return (
<div className="flex gap-1 py-4 self-stretch"> <div className="flex py-4 self-stretch">
<Input <Input
size="md" size="md"
{...register(`variables.${index}.key`, { register={register(`variables.${index}.key`, {
required: 'Key field cannot be empty', required: 'Key field cannot be empty',
})} })}
label={index === 0 ? 'Key' : undefined} label={index === 0 ? 'Key' : undefined}
@ -30,7 +30,7 @@ const AddEnvironmentVariableRow = ({
<Input <Input
size="md" size="md"
label={index === 0 ? 'Value' : undefined} label={index === 0 ? 'Value' : undefined}
{...register(`variables.${index}.value`, { register={register(`variables.${index}.value`, {
required: 'Value field cannot be empty', required: 'Value field cannot be empty',
})} })}
/> />
@ -38,7 +38,7 @@ const AddEnvironmentVariableRow = ({
<Button <Button
size="md" size="md"
iconOnly iconOnly
onClick={() => onDelete()} onClick={onDelete}
disabled={isDeleteDisabled} disabled={isDeleteDisabled}
> >
<TrashIcon /> <TrashIcon />