Created
March 2, 2025 19:30
-
-
Save notflip/83a7a5439a03727c5ec55e4cd347085d to your computer and use it in GitHub Desktop.
Revisions
-
notflip renamed this gist
Mar 2, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
notflip created this gist
Mar 2, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ import { FormControl, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form" import { Input } from "@/components/ui/input" export const TextField = ({ name, label, defaultValue, control }: any) => { return ( <FormField control={control} name={name} render={({ field, fieldState: { error } }) => ( <FormItem> <FormLabel>{label}</FormLabel> <FormControl> <Input placeholder={defaultValue} {...field} /> </FormControl> <FormMessage /> </FormItem> )} /> ) }