Skip to content

Commit a2500c0

Browse files
committed
Converts Context.Provider JSX opening and closing elements into Context.
1 parent 4251f7b commit a2500c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/ui/form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ const FormField = <
3636
...props
3737
}: ControllerProps<TFieldValues, TName>) => {
3838
return (
39-
<FormFieldContext.Provider value={{ name: props.name }}>
39+
(<FormFieldContext value={{ name: props.name }}>
4040
<Controller {...props} />
41-
</FormFieldContext.Provider>
41+
</FormFieldContext>)
4242
);
4343
};
4444

@@ -80,9 +80,9 @@ const FormItem = React.forwardRef<
8080
const id = React.useId();
8181

8282
return (
83-
<FormItemContext.Provider value={{ id }}>
83+
(<FormItemContext value={{ id }}>
8484
<div ref={ref} className={cn("space-y-2", className)} {...props} />
85-
</FormItemContext.Provider>
85+
</FormItemContext>)
8686
);
8787
});
8888
FormItem.displayName = "FormItem";

0 commit comments

Comments
 (0)