← marzneshin
/
v0.6.3
/
dashboard/src/modules/users/components/dialogs/mutation/fields/note.tsx
https://dev.kronoz.win/r/marzneshin.git
1import {
2 FormControl,
3 FormField,
4 FormItem,
5 Textarea,
6 FormLabel,
7 FormMessage,
8} from "@marzneshin/common/components";
9import { FC } from "react";
10import { useFormContext } from "react-hook-form";
11import { useTranslation } from "react-i18next";
12
13interface NoteFieldProps { }
14
15export const NoteField: FC<NoteFieldProps> = () => {
16 const { t } = useTranslation();
17 const form = useFormContext();
18 return (
19 <FormField
20 control={form.control}
21 name="note"
22 render={({ field }) => (
23 <FormItem>
24 <FormLabel>{t("note")}</FormLabel>
25 <FormControl>
26 <Textarea
27 placeholder={t("page.users.note-placeholder")}
28 className="resize-none"
29 {...field}
30 />
31 </FormControl>
32 <FormMessage />
33 </FormItem>
34 )}
35 />
36 );
37};