import { classNames } from '@/lib/components/classNames'; import type { ReactNode } from 'react'; import styles from './FormField.module.css'; interface FormFieldProps { id: string; label: string; required?: boolean; optionalLabel?: string | undefined; supportingText?: string | undefined; error?: string | undefined; children: ReactNode; className?: string | undefined; } export function FormField({ id, label, required = false, optionalLabel, supportingText, error, children, className, }: FormFieldProps) { return (
{supportingText}
) : null} {error ? ({error}
) : null}