File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22
3- export class OtpInput extends React . Component < OtpInputProps , OtpInputState > {
3+ declare class OtpInput extends React . Component <
4+ OtpInputProps ,
5+ OtpInputState ,
6+ any
7+ > {
48 static defaultProps : {
59 numInputs : number ;
610 onChange : ( otp : number ) => void ;
711 isDisabled : boolean ;
812 shouldAutoFocus : boolean ;
913 value : string ;
1014 } ;
15+ constructor ( props : Readonly < OtpInputProps > ) ;
16+ constructor ( props : OtpInputProps , context ?: any ) ;
1117 getOtpValue : ( ) => any ;
1218 getPlaceholderValue : ( ) => any ;
1319 handleOtpChange : ( otp : string [ ] ) => void ;
@@ -23,7 +29,7 @@ export class OtpInput extends React.Component<OtpInputProps, OtpInputState> {
2329 renderInputs : ( ) => any [ ] ;
2430}
2531
26- export interface OtpInputProps {
32+ interface OtpInputProps {
2733 className ?: string ;
2834 containerStyle ?: Object ;
2935 disabledStyle ?: Object ;
@@ -36,13 +42,16 @@ export interface OtpInputProps {
3642 isInputSecure ?: boolean ;
3743 numInputs : number ;
3844 onChange : Function ;
39- placeholder : string ;
45+ placeholder ? : string ;
4046 separator ?: Object ;
4147 shouldAutoFocus ?: boolean ;
4248 value ?: string ;
4349}
4450
45- export interface OtpInputState {
51+ interface OtpInputState {
4652 activeInput : number ;
4753 otp : string [ ] ;
4854}
55+
56+ export { OtpInputProps } ;
57+ export default OtpInput ;
You can’t perform that action at this time.
0 commit comments