Files
checkcle/application/src/components/services/add-service/ServiceConfigFields.tsx
T
2025-05-09 21:28:07 +07:00

52 lines
1.3 KiB
TypeScript

import { FormControl, FormField, FormItem, FormLabel } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { UseFormReturn } from "react-hook-form";
import { ServiceFormData } from "./types";
interface ServiceConfigFieldsProps {
form: UseFormReturn<ServiceFormData>;
}
export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) {
return (
<>
<FormField
control={form.control}
name="interval"
render={({ field }) => (
<FormItem>
<FormLabel>Heartbeat Interval</FormLabel>
<FormControl>
<Input
type="number"
placeholder="60"
className="bg-black border-gray-700"
{...field}
/>
</FormControl>
</FormItem>
)}
/>
<FormField
control={form.control}
name="retries"
render={({ field }) => (
<FormItem>
<FormLabel>Maximum Retries</FormLabel>
<FormControl>
<Input
type="number"
placeholder="3"
className="bg-black border-gray-700"
{...field}
/>
</FormControl>
</FormItem>
)}
/>
</>
);
}