File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
3
- export class OtpInput extends React . Component < OtpInputProps , OtpInputState > {
3
+ declare class OtpInput extends React . Component <
4
+ OtpInputProps ,
5
+ OtpInputState ,
6
+ any
7
+ > {
4
8
static defaultProps : {
5
9
numInputs : number ;
6
10
onChange : ( otp : number ) => void ;
7
11
isDisabled : boolean ;
8
12
shouldAutoFocus : boolean ;
9
13
value : string ;
10
14
} ;
15
+ constructor ( props : Readonly < OtpInputProps > ) ;
16
+ constructor ( props : OtpInputProps , context ?: any ) ;
11
17
getOtpValue : ( ) => any ;
12
18
getPlaceholderValue : ( ) => any ;
13
19
handleOtpChange : ( otp : string [ ] ) => void ;
@@ -23,7 +29,7 @@ export class OtpInput extends React.Component<OtpInputProps, OtpInputState> {
23
29
renderInputs : ( ) => any [ ] ;
24
30
}
25
31
26
- export interface OtpInputProps {
32
+ interface OtpInputProps {
27
33
className ?: string ;
28
34
containerStyle ?: Object ;
29
35
disabledStyle ?: Object ;
@@ -36,13 +42,16 @@ export interface OtpInputProps {
36
42
isInputSecure ?: boolean ;
37
43
numInputs : number ;
38
44
onChange : Function ;
39
- placeholder : string ;
45
+ placeholder ? : string ;
40
46
separator ?: Object ;
41
47
shouldAutoFocus ?: boolean ;
42
48
value ?: string ;
43
49
}
44
50
45
- export interface OtpInputState {
51
+ interface OtpInputState {
46
52
activeInput : number ;
47
53
otp : string [ ] ;
48
54
}
55
+
56
+ export { OtpInputProps } ;
57
+ export default OtpInput ;
You can’t perform that action at this time.
0 commit comments