import { BoxProps } from "../Box"; import * as React from "react"; interface IFormLabel extends BoxProps { /** * Content of the form label. */ children: React.ReactNode; } interface IFormControl { /** * Id of the form control. */ id?: string; /** * Name of the form control. */ name?: string; /** * Content of the form control. */ children?: React.ReactNode; /** * If `true` set the form control to the invalid state. */ isInvalid?: boolean; /** * If `true` set the form control to be required. */ isRequired?: boolean; /** * If `true` set the form control to the disabled state. */ isDisabled?: boolean; } export type FormControlProps = IFormControl & BoxProps; export const ErrorMessage: React.FC; export const ValidationMessage: React.FC; export const HelperMessage: React.FC; export const RequiredIndicator: React.FC; export const ValidationText: React.FC; /** * FormControl provides context such as `id`, `isInvalid`, `isRequired`, `isDisabled` to it's children. * This context is used by: * - `FormLabel` * - `FormHelperText`, * - `FormValidationText`, * - `Input` * * @example * ```jsx * * Email address * * We'll never share your email. * * ``` * */ declare const FormControl: React.FC; export default FormControl;