UNPKG

2.09 kBTypeScriptView Raw
1import * as React from 'react';
2export interface FormGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label'> {
3 /** Anything that can be rendered as FormGroup content. */
4 children?: React.ReactNode;
5 /** Additional classes added to the FormGroup. */
6 className?: string;
7 /** Label text before the field. */
8 label?: React.ReactNode;
9 /** Additional label information displayed after the label. */
10 labelInfo?: React.ReactNode;
11 /** Sets an icon for the label. For providing additional context. Host element for Popover */
12 labelIcon?: React.ReactElement;
13 /** Sets the FormGroup required. */
14 isRequired?: boolean;
15 /**
16 * Sets the FormGroup validated. If you set to success, text color of helper text will be modified to indicate valid state.
17 * If set to error, text color of helper text will be modified to indicate error state.
18 * If set to warning, text color of helper text will be modified to indicate warning state.
19 */
20 validated?: 'success' | 'warning' | 'error' | 'default';
21 /** Sets the FormGroup isInline. */
22 isInline?: boolean;
23 /** Sets the FormGroupControl to be stacked */
24 isStack?: boolean;
25 /** Removes top spacer from label. */
26 hasNoPaddingTop?: boolean;
27 /** Helper text regarding the field. It can be a simple text or an object. */
28 helperText?: React.ReactNode;
29 /** Flag to position the helper text before the field. False by default */
30 isHelperTextBeforeField?: boolean;
31 /** Helper text after the field when the field is invalid. It can be a simple text or an object. */
32 helperTextInvalid?: React.ReactNode;
33 /** Icon displayed to the left of the helper text. */
34 helperTextIcon?: React.ReactNode;
35 /** Icon displayed to the left of the helper text when the field is invalid. */
36 helperTextInvalidIcon?: React.ReactNode;
37 /** ID of the included field. It has to be the same for proper working. */
38 fieldId: string;
39}
40export declare const FormGroup: React.FunctionComponent<FormGroupProps>;
41//# sourceMappingURL=FormGroup.d.ts.map
\No newline at end of file