'use client' import React from 'react' export interface FormFieldProps { label?: string error?: string helperText?: string required?: boolean htmlFor?: string children: React.ReactNode className?: string } export const FormField = ({ label, error, helperText, required, htmlFor, children, className = '', }: FormFieldProps) => { const errorId = htmlFor ? `${htmlFor}-error` : undefined const helperId = htmlFor ? `${htmlFor}-helper` : undefined return (
{error}
)} {helperText && !error && ({helperText}
)}