rtaro-ui
Version:
UI KIT for Taro
85 lines (44 loc) • 1.49 kB
TypeScript
import { ComponentClass, ReactNode } from 'react'
import { CommonEvent, CommonEventFunction } from '@rtarojs/components/types/common'
import AtComponent from './base'
declare type InputProp = string | number
declare type InputFunction<T extends string | number> = (value: T, event: CommonEvent) => void
export interface AtInputProps extends AtComponent {
label?: string
type?: string
value: InputProp
placeholder?: string
placeholderStyle?: string
placeholderClass?: string
readOnly?: boolean
disabled?: boolean
allowClear?: boolean
maxLength?: InputProp
name?: string
renderPrefix?: () => ReactNode
renderSuffix?: () => ReactNode
showMakePhone?: boolean
focus?: boolean
border?: boolean
error?: boolean
required?: boolean
editable?: boolean
confirmType?: string
cursor?: InputProp
selectionStart?: InputProp
selectionEnd?: InputProp
cursorSpacing?: InputProp
adjustPosition?: boolean
backgroundColor?: string
textAlign?: 'left' | 'right'
enableNative?: boolean
onBlur?: InputFunction<string | number>
onFocus?: InputFunction<string | number>
onChange?: InputFunction<string | number>
onConfirm?: InputFunction<string | number>
onKeyboardHeightChange?: CommonEventFunction
onClick?: () => void
onErrorClick?: () => void
}
declare const AtInput: ComponentClass<AtInputProps>
export default AtInput