-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathOtpInput.types.ts
More file actions
43 lines (40 loc) · 1.15 KB
/
OtpInput.types.ts
File metadata and controls
43 lines (40 loc) · 1.15 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
import { ColorValue, TextInputProps, TextProps, TextStyle, ViewStyle } from "react-native";
export interface OtpInputProps {
numberOfDigits?: number;
autoFocus?: boolean;
focusColor?: ColorValue;
onTextChange?: (text: string) => void;
onFilled?: (text: string) => void;
onFocus?: () => void;
onBlur?: () => void;
blurOnFilled?: boolean;
hideStick?: boolean;
focusStickBlinkingDuration?: number;
secureTextEntry?: boolean;
theme?: Theme;
disabled?: boolean;
textInputProps?: TextInputProps;
textProps?: TextProps;
type?: "alpha" | "numeric" | "alphanumeric";
placeholder?: string;
defaultValue?: string;
}
export interface OtpInputRef {
clear: () => void;
focus: () => void;
setValue: (value: string) => void;
}
export interface Theme {
containerStyle?: ViewStyle;
/**
* @deprecated Use `containerStyle` instead
*/
inputsContainerStyle?: ViewStyle;
pinCodeContainerStyle?: ViewStyle;
filledPinCodeContainerStyle?: ViewStyle;
pinCodeTextStyle?: TextStyle;
focusStickStyle?: ViewStyle;
focusedPinCodeContainerStyle?: ViewStyle;
disabledPinCodeContainerStyle?: ViewStyle;
placeholderTextStyle?: TextStyle;
}