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