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