@project44-manifest/react
Version:
Manifest Design System react components
38 lines • 1.32 kB
TypeScript
import * as React from 'react';
import type { Validation } from '@react-types/shared';
import { As, Options, Props } from '../../system';
import type { StyleProps } from '../../types';
export declare type FormControlElement = 'div';
export interface FormControlOptions<T extends As = FormControlElement> extends Options<T>, StyleProps, Validation {
/**
* Helper text appended to the input element.
*/
helperText?: React.ReactNode;
/**
* Props passed to the helper text element.
*/
helperTextProps?: React.HTMLAttributes<HTMLElement>;
/**
* Whether user input is required on the input before form submission.
*
* @default true
*/
isRequired?: boolean;
/**
* The label for the form control input element.
*/
label?: React.ReactNode;
/**
* Props passed to the label element.
*/
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
/**
* The layout orientation of the form control.
*
* @default 'vertical'
*/
orientation?: 'horizontal' | 'vertical';
}
export declare type FormControlProps<T extends As = FormControlElement> = Props<FormControlOptions<T>>;
export declare const FormControl: import("../../system").Component<FormControlOptions<"div">>;
//# sourceMappingURL=FormControl.d.ts.map