'use client'; import { LegacyRef } from 'react'; import { experimental_useFormStatus as useFormStatus } from 'react-dom'; export default function FieldSetWithStatus({ id, label, note, value, onChange, required, readOnly, type = 'text', inputRef, }: { id: string label: string note?: string value: string onChange?: (value: string) => void required?: boolean readOnly?: boolean type?: 'text' | 'password' inputRef?: LegacyRef }) { const { pending } = useFormStatus(); return (
onChange?.(e.target.value)} type={type} autoComplete="off" readOnly={readOnly || pending} className="w-full" />
); };