-
Notifications
You must be signed in to change notification settings - Fork 611
/
PropsType.tsx
37 lines (36 loc) · 920 Bytes
/
PropsType.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react'
import { KeyboardTypeOptions } from 'react-native'
export type InputEventHandler = (value?: string) => void
export interface InputItemPropsType {
type?:
| 'text'
| 'bankCard'
| 'phone'
| 'password'
| 'number'
| 'digit'
| KeyboardTypeOptions
editable?: boolean
disabled?: boolean
name?: string
value?: string
defaultValue?: string
placeholder?: string
clear?: boolean
maxLength?: number
extra?: React.ReactNode
error?: boolean
// can not find out where it used
// onErrorPress?: Function;
// size?: 'large' | 'small';
labelNumber?: number
labelPosition?: 'left' | 'top'
textAlign?: 'left' | 'center' | 'right'
updatePlaceholder?: boolean
locale?: object
onChange?: (value: string) => void
onFocus?: InputEventHandler
onBlur?: InputEventHandler
onVirtualKeyboardConfirm?: InputEventHandler
children?: React.ReactNode
}