Home / Function/ SecretField() — supabase Function Reference

SecretField() — supabase Function Reference

Architecture documentation for the SecretField() function in EditSecretSheet.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EditSecretSheet.tsx lines 175–213

const SecretField = ({ form }: SecretFieldProps): ReactNode => {
  const [showSecretValue, setShowSecretValue] = useState(false)

  return (
    <FormField_Shadcn_
      control={form.control}
      name="value"
      render={({ field }) => (
        <FormItemLayout
          label="Value"
          layout="horizontal"
          description="Secrets can’t be retrieved once saved. Enter a new value to overwrite the existing value."
        >
          <FormControl_Shadcn_>
            <Input
              {...field}
              type={showSecretValue ? 'text' : 'password'}
              placeholder="my-secret-value"
              data-1p-ignore
              data-lpignore="true"
              data-form-type="other"
              data-bwignore
              actions={
                <div className="mr-1">
                  <Button
                    type="text"
                    className="px-1"
                    icon={showSecretValue ? <EyeOff /> : <Eye />}
                    onClick={() => setShowSecretValue(!showSecretValue)}
                  />
                </div>
              }
            />
          </FormControl_Shadcn_>
        </FormItemLayout>
      )}
    />
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free