import { FormControl, FormControlProps } from '@biom3/react'; interface FormControlWrapperProps { testId: string; children: React.ReactNode; subtext?: string; textAlign?: 'left' | 'right'; isErrored?: boolean; errorMessage?: string; sx?: FormControlProps['sx']; } export function FormControlWrapper({ testId, children, subtext, textAlign, isErrored, errorMessage, sx, }: FormControlWrapperProps) { return ( {children} {subtext && ( {subtext} )} {isErrored && ( {errorMessage} )} ); }