-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoPeriod.tsx
61 lines (57 loc) · 1.54 KB
/
AutoPeriod.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"use client";
import { CoralInput } from "../ui/CoralInput";
import { CounterInput } from "../ui/CounterInput";
import { CardContent } from "@repo/ui/components/card";
import { Checkbox } from "@repo/ui/components/checkbox";
import { FormField, FormItem, FormLabel } from "@repo/ui/components/form";
import { useFormContext } from "react-hook-form";
export function AutoPeriod() {
const form = useFormContext();
return (
<CardContent>
<FormField
control={form.control}
name="auto.auto_initiation_line"
render={({ field }) => (
<FormItem className="flex items-center gap-x-2 mb-2">
<Checkbox
className="size-6 mb-0"
checked={field.value}
onCheckedChange={field.onChange}
/>
<FormLabel className="text-sm flex items-center gap-2">
Moved off black line?
</FormLabel>
</FormItem>
)}
/>
<div className="grid min-[375px]:grid-cols-2 gap-4">
<CoralInput period="auto" />
<div>
<FormField
control={form.control}
name="auto.auto_algae_processed"
render={({ field }) => (
<FormItem>
<FormLabel className="text-sm">
Processor
</FormLabel>
<CounterInput min={0} {...field} />
</FormItem>
)}
/>
<FormField
control={form.control}
name="auto.auto_algae_netted"
render={({ field }) => (
<FormItem>
<FormLabel className="text-sm">Barge</FormLabel>
<CounterInput min={0} {...field} />
</FormItem>
)}
/>
</div>
</div>
</CardContent>
);
}