UNPKG

@cimpress/react-components

Version:
28 lines 1.4 kB
import React, { CSSProperties, InputHTMLAttributes, ReactElement, ReactNode } from 'react'; import { PublicComponentProps } from './types'; type Status = 'success' | 'warning' | 'error'; interface TextInputBaseProps<T> extends InputHTMLAttributes<T>, PublicComponentProps { status?: Status; helpText?: ReactNode; id?: string; inputStyle?: CSSProperties; label?: string; onChange: (event: React.ChangeEvent<T> & { isValid: boolean; }) => void; rightAddon?: ReactElement; type?: 'text' | 'number' | 'password' | 'url' | 'search' | 'email' | 'tel' | 'textarea'; } export declare const formGroupCss: string; export declare const formGroupActiveCss: string; export declare const controlLabelCss: string; export interface TextFieldProps extends TextInputBaseProps<HTMLInputElement> { /** Determines the HTML5 input type of the input. One of text, number, password, url, search, email, or tel. */ type?: 'text' | 'number' | 'password' | 'url' | 'search' | 'email' | 'tel'; } export interface TextAreaProps extends TextInputBaseProps<HTMLTextAreaElement> { } export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>; export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>; export {}; //# sourceMappingURL=TextInput.d.ts.map