UNPKG

667 BTypeScriptView Raw
1import * as React from "react";
2import { BoxProps } from "../Box";
3
4interface ILabelProps {
5 isInvalid?: boolean;
6 /**
7 * This prop is read from the `FormControl` context but can be passed as well.
8 * If passed, it'll override the context and give the `label` look disabled
9 */
10 isDisabled?: boolean;
11 children: React.ReactNode;
12}
13
14export type FormLabelProps = ILabelProps &
15 BoxProps &
16 React.LabelHTMLAttributes<any>;
17
18/**
19 * FormLabel is used for form inputs and controls.
20 * It reads from the `FormControl` context to handle it's styles for
21 * the various form states.
22 */
23declare const FormLabel: React.FC<FormLabelProps>;
24
25export default FormLabel;