UNPKG

2.05 kBTypeScriptView Raw
1import * as React from "react";
2import { type Intent } from "../../common";
3import { type HTMLDivProps, type IntentProps, type Props } from "../../common/props";
4export interface FormGroupProps extends IntentProps, Props, HTMLDivProps {
5 /** Group contents. */
6 children?: React.ReactNode;
7 /**
8 * A space-delimited list of class names to pass along to the
9 * `Classes.FORM_CONTENT` element that contains `children`.
10 */
11 contentClassName?: string;
12 /**
13 * Whether form group should appear as non-interactive.
14 * Remember that `input` elements must be disabled separately.
15 */
16 disabled?: boolean;
17 /**
18 * Whether the component should take up the full width of its container.
19 */
20 fill?: boolean;
21 /**
22 * Optional helper text. The given content will be wrapped in
23 * `Classes.FORM_HELPER_TEXT` and displayed beneath `children`.
24 * Helper text color is determined by the `intent`.
25 */
26 helperText?: React.ReactNode;
27 /** Whether to render the label and children on a single line. */
28 inline?: boolean;
29 /**
30 * Visual intent to apply to helper text and sub label.
31 * Note that child form elements need to have their own intents applied independently.
32 */
33 intent?: Intent;
34 /** Label of this form group. */
35 label?: React.ReactNode;
36 /**
37 * `id` attribute of the labelable form element that this `FormGroup` controls,
38 * used as `<label for>` attribute.
39 */
40 labelFor?: string;
41 /**
42 * Optional secondary text that appears after the label.
43 */
44 labelInfo?: React.ReactNode;
45 /** CSS properties to apply to the root element. */
46 style?: React.CSSProperties;
47 /**
48 * Optional text for `label`. The given content will be wrapped in
49 * `Classes.FORM_GROUP_SUB_LABEL` and displayed beneath `label`.
50 */
51 subLabel?: React.ReactNode;
52}
53/**
54 * Form group component.
55 *
56 * @see https://blueprintjs.com/docs/#core/components/form-group
57 */
58export declare const FormGroup: React.FC<FormGroupProps>;