@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
35 lines (34 loc) • 1.15 kB
TypeScript
import * as React from 'react';
import { SpaceProps } from '@xstyled/system';
export declare type InputPropsType = {
[key: string]: string;
};
declare type InputTypes = 'email' | 'number' | 'search' | 'tel' | 'text';
declare type InputContentType = string | number | any;
declare type InputEventHandler = (value?: InputContentType, event?: KeyboardEvent) => any;
interface InputProps extends React.HTMLAttributes<HTMLInputElement>, SpaceProps {
className?: string;
id?: string;
name?: string;
value?: InputContentType;
ariaLabel?: string;
autoComplete?: string;
autoFocus?: boolean;
disabled?: boolean;
label?: string;
placeholder?: string;
filter?: (value?: string) => any;
readOnly?: boolean;
prefix?: any;
size?: 'sm' | 'md' | 'lg';
suffix?: any;
type?: InputTypes;
inputProps?: InputPropsType;
onChange?: InputEventHandler;
onBlur?: InputEventHandler;
onKeyDown?: InputEventHandler;
onKeyUp?: InputEventHandler;
onFocus?: InputEventHandler;
}
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<any>>;
export {};