import * as React from "react" import { cn } from "../../lib/utils" // React 18 does not auto-forward `ref` through a plain function component, and `ui/textarea` was // already wrapped for that reason. Input needs it too: eight TextControl sites spread `{...field}` // from react-hook-form, and `field.ref` is how a failed validation focuses the offending field. With // nowhere for the ref to land, the form scrolls to nothing. const Input = React.forwardRef>( ({ className, type, ...props }, ref) => ( ) ) Input.displayName = "Input" export { Input }