我对shadn的<FormLabel>
有问题.当字段有错误/需要时,如何防止它显示红色(实际上它会自动添加text-destructive
).
我只想让<FormMessage/>
改变 colored颜色 .
<FormField
control={form.control}
name="name"
render={({ field }) => (
<FormItem>
<FormLabel>Project Name</FormLabel>
<FormControl>
<Input placeholder="Enter project name" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>