UNPKG

@molejs/mole-components-web

Version:

React组件库

18 lines (17 loc) 667 B
import React from 'react'; import { InputEventHandler } from './PropsType'; import { Omit } from '../_util/types'; export declare type HTMLInputProps = Omit<React.HTMLProps<HTMLInputElement>, 'onFocus' | 'onBlur'>; export interface InputProps extends HTMLInputProps { focused?: boolean; onFocus?: InputEventHandler; onBlur?: InputEventHandler; } declare class Input extends React.Component<InputProps, any> { inputRef: HTMLInputElement | null; onInputBlur: (e: React.FocusEvent<HTMLInputElement>) => void; onInputFocus: (e: React.FocusEvent<HTMLInputElement>) => void; focus: () => void; render(): JSX.Element; } export default Input;