UNPKG

@trussworks/react-uswds

Version:
20 lines (19 loc) 871 B
import { default as React, JSX } from 'react'; import { ValidationStatus } from '../../../types/validationStatus'; import { LegacyInputRef } from '../../../types/legacyInputRef'; type RequiredTextInputProps = { id: string; name: string; type: 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url'; }; type CustomTextInputProps = { className?: string; validationStatus?: ValidationStatus; inputSize?: 'small' | 'medium'; inputRef?: LegacyInputRef; inputProps?: JSX.IntrinsicElements['input']; }; export type OptionalTextInputProps = CustomTextInputProps & JSX.IntrinsicElements['input']; export type TextInputProps = RequiredTextInputProps & OptionalTextInputProps; export declare const TextInput: React.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>; export default TextInput;