@project44-manifest/react
Version:
Manifest Design System react components
62 lines • 2.12 kB
TypeScript
import * as React from 'react';
import type { FocusableProps, ValidationState } from '@react-types/shared';
import { As, Options, Props } from '../../system';
import type { StyleProps } from '../../types';
export declare type TextFieldBaseElement = 'div';
export interface TextFieldBaseOptions<T extends As = TextFieldBaseElement> extends Options<T>, FocusableProps, StyleProps {
/**
* Icon displayed at the end of the text field.
*/
endIcon?: React.ReactNode;
/**
* Helper text to append to the form control input element.
*/
helperText?: React.ReactNode;
/**
* Props passed to the helper text.
*/
helperTextProps?: React.HTMLAttributes<HTMLElement>;
/**
* The ref passed to the input element.
*/
inputRef?: React.RefObject<HTMLInputElement | HTMLTextAreaElement>;
/**
* Props passed to the input element.
*/
inputProps?: React.InputHTMLAttributes<HTMLInputElement> | React.TextareaHTMLAttributes<HTMLTextAreaElement>;
/**
* Whether the input is disabled.
*/
isDisabled?: boolean;
/**
* Whether the input can be selected but not changed by the user.
*/
isReadOnly?: boolean;
/**
* Whether user input is required on the input before form submission.
*/
isRequired?: boolean;
/**
* Label of the input element
*/
label?: React.ReactNode;
/**
* Props passed to the label.
*/
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
/**
* Whether the textfield should support multiline input (textarea).
*/
multiline?: boolean;
/**
* Icon displayed at the start of the text field.
*/
startIcon?: React.ReactNode;
/**
* Whether the input should display its "valid" or "invalid" visual styling.
*/
validationState?: ValidationState;
}
export declare type TextFieldBaseProps<T extends As = TextFieldBaseElement> = Props<TextFieldBaseOptions<T>>;
export declare const TextFieldBase: import("../../system").Component<TextFieldBaseOptions<"div">>;
//# sourceMappingURL=TextFieldBase.d.ts.map