import { useId } from "@radix-ui/react-id"; import { forwardRef, ReactNode } from "react"; import { FormProvider, UseFormReturn } from "react-hook-form"; import classNames from "@lib/classNames"; export const Input = forwardRef(function Input(props, ref) { return ( ); }); export function Label(props: JSX.IntrinsicElements["label"]) { return ( ); } export const TextField = forwardRef< HTMLInputElement, { label: ReactNode; } & React.ComponentProps & { labelProps?: React.ComponentProps; } >(function TextField(props, ref) { const id = useId(); const { label, ...passThroughToInput } = props; // TODO: use `useForm()` from RHF and get error state here too! return (
); }); // eslint-disable-next-line @typescript-eslint/no-explicit-any export const Form = forwardRef } & JSX.IntrinsicElements["form"]>( function Form(props, ref) { const { form, ...passThrough } = props; return (
{props.children}
); } );