Skip to content

Commit 8831133

Browse files
ishan-chhabraapollonian
authored andcommitted
🔥 🏷️ Remove render prop
1 parent 9be6fd8 commit 8831133

1 file changed

Lines changed: 26 additions & 25 deletions

File tree

index.d.ts

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1+
import React from 'react';
2+
13
export default OtpInput;
2-
declare class OtpInput {
3-
static defaultProps: {
4-
numInputs: number;
5-
onChange: (otp: number) => void;
6-
isDisabled: boolean;
7-
shouldAutoFocus: boolean;
8-
value: string;
9-
};
10-
state: {
11-
activeInput: number;
12-
};
13-
getOtpValue: () => any;
14-
getPlaceholderValue: () => any;
15-
handleOtpChange: (otp: string[]) => void;
16-
isInputValueValid: (value: any) => boolean;
17-
focusInput: (input: number) => void;
18-
focusNextInput: () => void;
19-
focusPrevInput: () => void;
20-
changeCodeAtFocus: (value: string) => void;
21-
handleOnPaste: (e: Object) => void;
22-
handleOnChange: (e: Object) => void;
23-
handleOnKeyDown: (e: Object) => void;
24-
handleOnInput: (e: Object) => void;
25-
renderInputs: () => any[];
26-
render(): any;
4+
declare class OtpInput extends React.Component {
5+
static defaultProps: {
6+
numInputs: number;
7+
onChange: (otp: number) => void;
8+
isDisabled: boolean;
9+
shouldAutoFocus: boolean;
10+
value: string;
11+
};
12+
state: {
13+
activeInput: number;
14+
};
15+
getOtpValue: () => any;
16+
getPlaceholderValue: () => any;
17+
handleOtpChange: (otp: string[]) => void;
18+
isInputValueValid: (value: any) => boolean;
19+
focusInput: (input: number) => void;
20+
focusNextInput: () => void;
21+
focusPrevInput: () => void;
22+
changeCodeAtFocus: (value: string) => void;
23+
handleOnPaste: (e: Object) => void;
24+
handleOnChange: (e: Object) => void;
25+
handleOnKeyDown: (e: Object) => void;
26+
handleOnInput: (e: Object) => void;
27+
renderInputs: () => any[];
2728
}

0 commit comments

Comments
 (0)