import React, { ReactNode } from 'react'; interface FormGroupProps { label: string; htmlFor?: string; error?: string; helpText?: string; required?: boolean; children: ReactNode; } export default function FormGroup({ label, htmlFor, error, helpText, required, children, }: FormGroupProps) { return (
{htmlFor && ( )}
{children}
{error ? (

{error}

) : helpText ? (

{helpText}

) : null}
); }