File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-otp-input" ,
3
- "version" : " 0.3.1 " ,
3
+ "version" : " 0.3.2 " ,
4
4
"description" : " A fully customizable, one-time password input component for the web built with React" ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class SingleOtpInput extends PureComponent<*> {
63
63
}
64
64
}
65
65
66
- getClasses = ( ...classes ) => classes . filter ( c => ! isStyleObject ( c ) && c !== false ) . join ( ' ' ) ;
66
+ getClasses = ( ...classes ) =>
67
+ classes . filter ( c => ! isStyleObject ( c ) && c !== false ) . join ( ' ' ) ;
67
68
68
69
render ( ) {
69
70
const {
@@ -89,12 +90,13 @@ class SingleOtpInput extends PureComponent<*> {
89
90
< input
90
91
style = { Object . assign (
91
92
{ width : '1em' , textAlign : 'center' } ,
92
- inputStyle ,
93
+ isStyleObject ( inputStyle ) && inputStyle ,
93
94
focus && isStyleObject ( focusStyle ) && focusStyle ,
94
95
isDisabled && isStyleObject ( disabledStyle ) && disabledStyle ,
95
96
hasErrored && isStyleObject ( errorStyle ) && errorStyle
96
97
) }
97
98
className = { this . getClasses (
99
+ inputStyle ,
98
100
focus && focusStyle ,
99
101
isDisabled && disabledStyle ,
100
102
hasErrored && errorStyle
@@ -275,7 +277,13 @@ class OtpInput extends Component<Props, State> {
275
277
const { containerStyle } = this . props ;
276
278
277
279
return (
278
- < div style = { Object . assign ( { display : 'flex' } , isStyleObject ( containerStyle ) && containerStyle ) } className = { ! isStyleObject ( containerStyle ) && containerStyle } >
280
+ < div
281
+ style = { Object . assign (
282
+ { display : 'flex' } ,
283
+ isStyleObject ( containerStyle ) && containerStyle
284
+ ) }
285
+ className = { ! isStyleObject ( containerStyle ) && containerStyle }
286
+ >
279
287
{ this . renderInputs ( ) }
280
288
</ div >
281
289
) ;
You can’t perform that action at this time.
0 commit comments