File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 3737 "test:watch" : " react-scripts test --env=jsdom" ,
3838 "release" : " npm run test && npm run prepare && dotenv release-it" ,
3939 "lint" : " eslint . --ext .js,.ts,.tsx" ,
40- "format" : " prettier --write {src,playground}" ,
40+ "format" : " prettier --write {src,playground}/**/*.{ts,tsx} " ,
4141 "format:check" : " prettier --check {src,playground}/**/*.{ts,tsx}"
4242 },
4343 "peerDependencies" : {
9393 " input" ,
9494 " autocompletion"
9595 ]
96- }
96+ }
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ export interface ReactInputVerificationCodeProps {
2323const ReactInputVerificationCode = ( {
2424 autoFocus = false ,
2525 length = 4 ,
26- onChange = ( ) => { } ,
27- onCompleted = ( ) => { } ,
26+ onChange = ( ) => { } ,
27+ onCompleted = ( ) => { } ,
2828 placeholder = '·' ,
2929 value : pValue ,
3030 dataCy = 'verification-code' ,
@@ -156,7 +156,8 @@ const ReactInputVerificationCode = ({
156156 const stringValue = value . join ( '' ) ;
157157 const isCompleted = stringValue . length === length ;
158158
159- if ( isCompleted && stringValue !== emptyValue . join ( '' ) ) onCompleted ( stringValue ) ;
159+ if ( isCompleted && stringValue !== emptyValue . join ( '' ) )
160+ onCompleted ( stringValue ) ;
160161 onChange ( stringValue ) ;
161162 } , [ value , length ] ) ;
162163
@@ -208,8 +209,9 @@ const ReactInputVerificationCode = ({
208209 ref = { ref }
209210 role = 'button'
210211 tabIndex = { 0 }
211- className = { `ReactInputVerificationCode__item ${ value [ i ] !== placeholder ? 'is-filled' : ''
212- } ${ i === activeIndex ? 'is-active' : '' } `}
212+ className = { `ReactInputVerificationCode__item ${
213+ value [ i ] !== placeholder ? 'is-filled' : ''
214+ } ${ i === activeIndex ? 'is-active' : '' } `}
213215 onFocus = { onItemFocus ( i ) }
214216 data-cy = { `${ dataCy } -${ i } -item` }
215217 >
You can’t perform that action at this time.
0 commit comments