UNPKG

1.87 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { IntentProps, Props } from "../../common/props";
4export declare type FormGroupProps = IFormGroupProps;
5/** @deprecated use FormGroupProps */
6export interface IFormGroupProps extends IntentProps, Props {
7 /** Group contents. */
8 children?: React.ReactNode;
9 /**
10 * A space-delimited list of class names to pass along to the
11 * `Classes.FORM_CONTENT` element that contains `children`.
12 */
13 contentClassName?: string;
14 /**
15 * Whether form group should appear as non-interactive.
16 * Remember that `input` elements must be disabled separately.
17 */
18 disabled?: boolean;
19 /**
20 * Optional helper text. The given content will be wrapped in
21 * `Classes.FORM_HELPER_TEXT` and displayed beneath `children`.
22 * Helper text color is determined by the `intent`.
23 */
24 helperText?: React.ReactNode;
25 /** Whether to render the label and children on a single line. */
26 inline?: boolean;
27 /** Label of this form group. */
28 label?: React.ReactNode;
29 /**
30 * `id` attribute of the labelable form element that this `FormGroup` controls,
31 * used as `<label for>` attribute.
32 */
33 labelFor?: string;
34 /**
35 * Optional secondary text that appears after the label.
36 */
37 labelInfo?: React.ReactNode;
38 /** CSS properties to apply to the root element. */
39 style?: React.CSSProperties;
40 /**
41 * Optional text for `label`. The given content will be wrapped in
42 * `Classes.FORM_GROUP_SUB_LABEL` and displayed beneath `label`. The text color
43 * is determined by the `intent`.
44 */
45 subLabel?: React.ReactNode;
46}
47export declare class FormGroup extends AbstractPureComponent2<FormGroupProps> {
48 static displayName: string;
49 render(): JSX.Element;
50 private getClassName;
51}