File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
44
5+ ## 7.5.0
6+
7+ - Fix typescript error ` Type Error: 'Cursor' cannot be used as a JSX component `
8+
9+
510## 7.4.0
611
712- Add ` autoComplete ` prop by default, for ` CodeField ` component [ #239 ] ( https://github.com/retyui/react-native-confirmation-code-field/pull/239 )
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-confirmation-code-field" ,
3- "version" : " 7.4 .0" ,
3+ "version" : " 7.5 .0" ,
44 "main" : " esm/index.js" ,
55 "types" : " esm/index.d.ts" ,
66 "files" : [
Original file line number Diff line number Diff line change 1- import { useState } from 'react' ;
1+ import { useState , ReactNode } from 'react' ;
22import { useInterval } from './useTimer' ;
33
44export const DEFAULT_BLINKING_SPEED = 500 ;
@@ -7,11 +7,10 @@ export const DEFAULT_CURSOR_SYMBOL = '|';
77export function Cursor ( {
88 cursorSymbol = DEFAULT_CURSOR_SYMBOL ,
99 delay = DEFAULT_BLINKING_SPEED ,
10- } ) : React . JSX . Element {
10+ } ) : ReactNode {
1111 const [ visibleFlag , setFlag ] = useState ( true ) ;
1212
1313 useInterval ( ( ) => setFlag ( ( flag ) => ! flag ) , delay ) ;
1414
15- // @ts -expect-error `JSX.Element` is not a `ReactNode`
1615 return visibleFlag ? cursorSymbol : '' ;
1716}
You can’t perform that action at this time.
0 commit comments