UNPKG

antd

Version:

An enterprise-class UI design language and React-based implementation

56 lines (55 loc) 2.37 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import Group from './Group'; import Search from './Search'; import TextArea from './TextArea'; import { Omit } from '../_util/type'; export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> { prefixCls?: string; size?: 'large' | 'default' | 'small'; onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; prefix?: React.ReactNode; suffix?: React.ReactNode; } export default class Input extends React.Component<InputProps, any> { static Group: typeof Group; static Search: typeof Search; static TextArea: typeof TextArea; static defaultProps: { prefixCls: string; type: string; disabled: boolean; }; static propTypes: { type: PropTypes.Requireable<string>; id: PropTypes.Requireable<string | number>; size: PropTypes.Requireable<string>; maxLength: PropTypes.Requireable<string | number>; disabled: PropTypes.Requireable<boolean>; value: PropTypes.Requireable<any>; defaultValue: PropTypes.Requireable<any>; className: PropTypes.Requireable<string>; addonBefore: PropTypes.Requireable<React.ReactNode>; addonAfter: PropTypes.Requireable<React.ReactNode>; prefixCls: PropTypes.Requireable<string>; onPressEnter: PropTypes.Requireable<(...args: any[]) => any>; onKeyDown: PropTypes.Requireable<(...args: any[]) => any>; onKeyUp: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; prefix: PropTypes.Requireable<React.ReactNode>; suffix: PropTypes.Requireable<React.ReactNode>; }; input: HTMLInputElement; handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void; focus(): void; blur(): void; getInputClassName(): any; saveInput: (node: HTMLInputElement) => void; renderLabeledInput(children: React.ReactElement<any>): React.ReactElement<any>; renderLabeledIcon(children: React.ReactElement<any>): React.ReactElement<any>; renderInput(): React.ReactElement<any>; render(): React.ReactElement<any>; }