import { FC } from 'react'; import { ComponentWithAs as _, FormLabelProps as ChakraFormLabelProps, HTMLChakraProps, TextProps, ThemingProps } from '@chakra-ui/react'; export interface FormLabelProps extends ChakraFormLabelProps { /** * Question number to be prefixed before each label, if any. */ questionNumber?: React.ReactNode; /** * Tooltip text to be postfixed at the end of each label, if any. */ tooltipText?: React.ReactNode; /** * Description text to be shown below the label text, if any. */ description?: React.ReactNode; /** * Label text. */ children: React.ReactNode; /** * Whether form label is required. This is optional; if this prop is not * provided, the value from it's parent `FormContext` (if any) will be used. */ isRequired?: boolean; } /** * @preconditions Must be a child of Chakra's `FormControl` component. * Used to enhance the usability of form controls. * * It is used to inform users as to what information * is requested for a form field. * * ♿️ Accessibility: Every form field should have a form label. */ export declare const FormLabel: { ({ isRequired, tooltipText, questionNumber, description, children, size, ...labelProps }: FormLabelProps): JSX.Element; displayName: string; Label: _<"label", ChakraFormLabelProps>; Description: FC; QuestionNumber({ children, ...props }: TextProps): JSX.Element; OptionalIndicator: _<"span", OptionalIndicatorProps>; }; interface FormLabelDescriptionProps extends TextProps { } interface OptionalIndicatorProps extends HTMLChakraProps<'span'> { size?: ThemingProps<'Form'>['size']; isRequired?: boolean; } export {};