UNPKG

@quanxi/ui

Version:

全悉组件库

40 lines (39 loc) 1.36 kB
import React, { UIEventHandler } from "react"; import "./style.scss"; export interface InputProps { type?: "text" | "textarea" | "password"; placeholder?: string; size?: "medium" | "large"; prefix?: React.ReactNode; suffix?: string | React.ReactNode; maxLength?: number; disabled?: boolean; status?: "error"; value?: string; showCount?: boolean; rows?: number; autoSize?: boolean; textareaRef?: React.RefObject<HTMLTextAreaElement>; showSearchIcon?: boolean; showEyeIcon?: boolean; className?: string; allowClear?: boolean; wrap?: "off" | "soft" | "hard"; onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void; onClick?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void; onScroll?: UIEventHandler; style?: React.CSSProperties; onPressEnter?: (value: string) => void; onKeyDown?: (v: any) => void; onClear?: () => void; noMaxLength?: boolean; showHighLight?: boolean; maxRows?: number; onInput?: (e: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>) => void; onBlur?: (v: React.FocusEvent<HTMLInputElement>) => void; } export interface InputRef { focus: () => void; } declare const _default: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>; export default _default;