import { Input } from "../ui/Input"; import { PasswordInput } from "./PasswordInput"; import type { ConnectionFormData } from "./connectionFormData"; export interface GeneralTabProps { form: ConnectionFormData; onChange: (updates: Partial) => void; } const AUTH_OPTIONS = ["User & Password"]; export function GeneralTab({ form, onChange }: GeneralTabProps) { const isSqlite = form.db_type === "sqlite"; return (
onChange({ name: value })} placeholder="My Production Database" aria-label="Name" />
{!isSqlite && (
onChange({ host: value })} placeholder="localhost" aria-label="Host" />
onChange({ port: value === "" ? null : Number(value) })} placeholder="5432" aria-label="Port" />
)}
onChange({ username: value || null })} placeholder="postgres" aria-label="User" />
onChange({ password: value || null })} placeholder="••••••••" aria-label="Password" />
onChange({ database: value || null })} placeholder="database" aria-label="Database" />
); }