feat: attempt to fix the crud with auth
This commit is contained in:
18
contexts/FormItem/FormItemProvider.tsx
Normal file
18
contexts/FormItem/FormItemProvider.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { cn } from '@utils/cn';
|
||||
import * as React from 'react';
|
||||
import { FormItemContext } from './FormItemContext';
|
||||
|
||||
export const FormItem = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
>(({ className, ...props }, ref) => {
|
||||
const id = React.useId();
|
||||
|
||||
return (
|
||||
<FormItemContext.Provider value={{ id }}>
|
||||
<div ref={ref} className={cn('space-y-2', className)} {...props} />
|
||||
</FormItemContext.Provider>
|
||||
);
|
||||
});
|
||||
|
||||
FormItem.displayName = 'FormItem';
|
||||
Reference in New Issue
Block a user