-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
78 lines (71 loc) · 2.66 KB
/
index.d.ts
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
import {
ColorValue,
FlexStyle,
KeyboardTypeOptions,
NativeSyntheticEvent,
StyleProp,
TextInputChangeEventData,
TextInputKeyPressEventData,
TextInputSubmitEditingEventData,
TextStyle,
ViewStyle,
} from "react-native";
type DigitBoxProps = {
// Styling Props
borderBottomWidth?: number | undefined;
borderColor?: ColorValue | undefined;
boxBackgroundColor?: ColorValue | undefined;
boxBorderRadius?: number | undefined;
boxContainerStyle?: StyleProp<ViewStyle> | undefined;
digitColor?: ColorValue | undefined;
elevation?: number | undefined;
// General Props
animateDuration?: number | undefined;
autoFocus?: boolean | undefined;
cursorColor?: ColorValue | undefined;
digitSize?: number | undefined;
focused?: boolean | undefined;
inputStyle?: StyleProp<TextStyle> | undefined;
keyboardType?: KeyboardTypeOptions | undefined;
maxLength?: number | undefined;
onlyBorderBottom?: boolean | undefined;
secureTextEntry?: boolean | undefined;
value?: string | undefined;
// Event Props
onChange?: (e: NativeSyntheticEvent<TextInputChangeEventData>) => void | undefined;
onFocus?: () => void | undefined;
onKeyPress?: (e: NativeSyntheticEvent<TextInputKeyPressEventData>) => void | undefined;
onSubmitEditing?: ((e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void) | undefined
};
type OTPInputProps = {
// General Props
count?: number;
removeOnBackspace?: boolean;
autofocus?: boolean;
onChangeText: ((text: string) => void) | undefined;
onSubmitEditing?: ((e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void) | undefined
value: string;
// Container Props
containerWidth?: FlexStyle["width"];
containerStyle?: StyleProp<ViewStyle> | undefined;
// DigitBox props
allowDigitsOnly?: boolean | undefined;
animateDuration?: number | undefined;
borderBottomWidth?: number | undefined;
borderColor?: ColorValue | undefined;
boxBackgroundColor?: ColorValue | undefined;
boxBorderRadius?: number | undefined;
boxContainerStyle?: StyleProp<ViewStyle> | undefined;
boxElevation?: number | undefined;
boxHeight?: FlexStyle["height"] | undefined;
cursorColor?: ColorValue | undefined;
digitColor?: ColorValue | undefined;
digitFontSize?: number | undefined;
inputStyle?: StyleProp<TextStyle> | undefined;
keyboardType?: KeyboardTypeOptions | undefined;
margin?: FlexStyle["margin"] | undefined;
maxLength?: number | undefined;
onlyBorderBottom?: boolean | undefined;
secureTextEntry?: boolean | undefined;
};
export type { DigitBoxProps, OTPInputProps };