We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91dd263 commit c768a3cCopy full SHA for c768a3c
src/lib/index.jsx
@@ -13,6 +13,9 @@ type Props = {
13
separator?: Object,
14
containerStyle?: Object,
15
inputStyle?: Object,
16
+ inputFocusStyle?: Object,
17
+ disabled?: boolean,
18
+ inputDisabledStyle?: Object,
19
};
20
21
type State = {
@@ -85,6 +88,7 @@ class OtpInput extends Component<Props, State> {
85
88
static defaultProps = {
86
89
numInputs: 4,
87
90
onChange: (otp: number): void => console.log(otp),
91
+ disabled: false,
92
93
94
state = {
@@ -161,6 +165,7 @@ class OtpInput extends Component<Props, State> {
161
165
this.focusNextInput();
162
166
163
167
168
+ // Handle cases of backspace, delete, left arrow, right arrow
164
169
handleOnKeyDown = (e: Object) => {
170
switch (e.keyCode) {
171
case BACKSPACE:
0 commit comments