@@ -12,14 +12,8 @@ import { AlertErrorFormSubmission } from '../alert-error-form-submission'
1212import type { UseFormReturn } from 'react-hook-form'
1313import type { FormSchemaRunFromRegistry } from '../../lib/get-form-schema-run-from-registry'
1414import type { GroupedEnvVars } from '../../lib/group-env-vars'
15- import {
16- Tooltip ,
17- TooltipContent ,
18- TooltipTrigger ,
19- } from '@/common/components/ui/tooltip'
2015import type { RegistryEnvVar } from '@/common/api/generated/types.gen'
2116import { cn } from '@/common/lib/utils'
22- import { AsteriskIcon } from 'lucide-react'
2317import { FormComboboxSecretStore } from '@/common/components/secrets/form-combobox-secrets-store'
2418
2519interface ConfigurationTabContentProps {
@@ -30,21 +24,6 @@ interface ConfigurationTabContentProps {
3024 groupedEnvVars : GroupedEnvVars
3125}
3226
33- /**
34- * Renders an asterisk icon & tooltip for required fields.
35- * NOTE: uses absolute positioning & assumes that it is being rendered inside a container with `position: relative`.
36- */
37- function TooltipValueRequired ( ) {
38- return (
39- < Tooltip >
40- < TooltipTrigger asChild autoFocus = { false } >
41- < AsteriskIcon className = "text-muted-foreground size-4" />
42- </ TooltipTrigger >
43- < TooltipContent > Required</ TooltipContent >
44- </ Tooltip >
45- )
46- }
47-
4827function SecretRow ( {
4928 secret,
5029 form,
@@ -63,16 +42,15 @@ function SecretRow({
6342 < FormItem >
6443 < div className = "relative" >
6544 < FormControl >
66- < Label
45+ < FormLabel
46+ required = { secret . required }
6747 htmlFor = { `secrets.${ index } .value` }
6848 className = { cn (
69- 'text-muted-foreground !border-input h-full items-center font-mono !ring-0' ,
70- secret . required ? 'pr-8' : ''
49+ 'text-muted-foreground !border-input h-full items-center font-mono !ring-0'
7150 ) }
7251 >
73- < span > { secret . name } </ span >
74- { secret . required && < TooltipValueRequired /> }
75- </ Label >
52+ { secret . name }
53+ </ FormLabel >
7654 </ FormControl >
7755 </ div >
7856 < FormMessage />
@@ -142,16 +120,16 @@ function EnvVarRow({
142120 < FormItem >
143121 < div className = "relative" >
144122 < FormControl >
145- < Label
123+ < FormLabel
124+ required = { envVar . required }
146125 htmlFor = { `envVar.${ index } .value` }
147126 className = { cn (
148127 `text-muted-foreground !border-input flex h-full items-center gap-1 font-mono
149128 !ring-0`
150129 ) }
151130 >
152- < span > { envVar . name } </ span >
153- { envVar . required && < TooltipValueRequired /> }
154- </ Label >
131+ { envVar . name }
132+ </ FormLabel >
155133 </ FormControl >
156134 </ div >
157135 < FormMessage />
0 commit comments