import { default as React } from 'react'; import { FormOnColor, FormSize } from '../../constants'; import { TitleTags } from '../Title'; export type FormGroupTags = 'fieldset' | 'div'; export interface FormGroupProps { /** Can be used as a replacement text for legend in cases where the group title already exists externally */ ariaLabelledBy?: string; /** title for the the fieldset */ title?: string; /** text placed in the legend tag of the fieldset */ legend?: string; /** id for the legend tag */ legendId?: string; /** Items in the FormGroup component */ children?: React.ReactNode; /** Adds custom classes to the element. */ className?: string; /** Adds custom classes to the errorWrapper. */ errorWrapperClassName?: string; /** Adds custom classes to the fieldset element. */ fieldsetClassName?: string; /** Sets a tag that describes whether the form group is required or optional */ formFieldTag?: React.ReactNode; /** Adds custom classes to the legend element. */ legendClassName?: string; /** Changes the visuals of the formgroup */ onColor?: keyof typeof FormOnColor; /** Changes the visuals of the formgroup */ size?: keyof typeof FormSize; /** Error message */ error?: string; /** Error text id */ errorTextId?: string; /** Sets the data-testid attribute. */ testId?: string; /** Sets the data-testid attribute for the error-wrapper. */ errorWrapperTestId?: string; /** Unique name for the child input element */ name?: string; /** Unique name for the fieldset */ fieldsetName?: string; /** Sets div instead of fieldset tag */ htmlMarkup?: FormGroupTags; /** Markup for legend if formgroup htmlMarkup is div*/ legendHtmlMarkup?: TitleTags; /** Markup for title */ titleHtmlMarkup?: TitleTags; /** Renders the error component (Default: true) */ renderError?: boolean; /** Ref passed to the error message element */ errorMessageRef?: React.Ref; } export declare const FormGroup: React.FC; export default FormGroup;