-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.d.ts
More file actions
90 lines (72 loc) · 1.83 KB
/
index.d.ts
File metadata and controls
90 lines (72 loc) · 1.83 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
type ViewStyle = import('react-native').ViewStyle
type TextInputProps = import('react-native').TextInputProps
type StyleProp<T> = import('react-native').StyleProp<T>
type TextStyle = import('react-native').TextStyle
type AnimatedInputProps = {
/**
* Shows or hides the error text and color
* @defaultValue true
*/
valid?: boolean
/**
* Sets the error text to be displayed
*/
errorText?: string
/**
* Sets the color of the error highlight
* @defaultValue 'red'
*/
errorColor?: string
/**
* Defines the placeholder text to be shown and animated when onFocus
*/
placeholder: string
/**
* Lock or unlock text input
* @defaultValue false
*/
disabled?: boolean
/**
* Defines the value of the input
*/
value?: string
/**
* Works exactly as TextInput/ component callback function that will handle the text input
*/
onChangeText?: (t: string) => void
/**
* Renders the component on the beginning of the input
* @example R$ -> R$ 200,00
*/
prefix?: JSX.Element
/**
* Renders the component on the end of the input
* @example Kg -> 200Kg
*/
sufix?: JSX.Element
/**
* Any other prop of the TextInput/ component can be used and will work properly
*/
others?: TextInputProps
/**
* Customizes the component main View
*/
styleContent?: StyleProp<ViewStyle>
/**
* Customizes the TextInput component
*/
styleInput?: StyleProp<TextStyle>
/**
* Customizes the error to be shown
*/
styleError?: StyleProp<TextStyle>
/**
* Customizes the label/placeholder of the input
*/
styleLabel?: StyleProp<TextStyle>
/**
* Customizes the view that manage the component composition - sufix, prefix, animated
*/
styleBodyContent?: StyleProp<ViewStyle>
}
export default function AnimatedInput(props: AnimatedInputProps): JSX.Element