gitscope
← marzneshin / v0.5.6 / dashboard/src/features/hosts/dialogs/mutation/fields/host.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/features/hosts/dialogs/mutation/fields/host.tsx · TypeScript
Blame Raw
 1import {
 2    FormControl,
 3    FormField,
 4    FormItem,
 5    FormLabel,
 6    FormMessage,
 7    Input,
 8} from "@marzneshin/components";
 9import { useFormContext } from "react-hook-form";
10import { useTranslation } from "react-i18next";
11
12export const HostField = () => {
13    const { t } = useTranslation();
14    const form = useFormContext();
15    return (
16        <FormField
17            control={form.control}
18            name="host"
19            render={({ field }) => (
20                <FormItem className="w-full">
21                    <FormLabel>{t("host")}</FormLabel>
22                    <FormControl>
23                        <Input {...field} />
24                    </FormControl>
25                    <FormMessage />
26                </FormItem>
27            )}
28        />
29    );
30};