import * as React from 'react'; import type { BackyardBaseProps, BackyardToken } from '../utils/typings/BackyardProps'; import type { BDSForwardRef } from '../utils/typings/BDSComponentProps'; /** * Backyard React Form Group * * `FormGroup` allows for grouping inputs such as * `Checkbox` and `Switch` and align them into columns or rows. * * For `Radio` it is recommended to use `RadioGroup` because * it provides extra functionality for handling `radio` inputs. * * This component is useful when combined with `FormControl` to * organize the visual structure of the form input. Example: * * ``` * * Heading Above FormGroup * * } * label="Label 1" * /> * } * label="Label 2" * /> * } * label="Label 3" * /> * * Helper Text Below FormGroup * * ``` */ declare const FormGroup: BDSForwardRef; declare type FormGroupRef = HTMLDivElement; interface FormGroupProps extends BackyardBaseProps { /** * Children of FormGroup */ children?: React.ReactNode; /** * DOM class name */ className?: string; /** * Direction to render children */ direction?: 'column' | 'row'; /** * Spacing token between form inputs */ spacing?: string | keyof BackyardToken['sizes']; } export { FormGroup }; export type { FormGroupProps, FormGroupRef }; export default FormGroup;