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 2
2
3
3
This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
4
4
5
+ ## 7.5.0
6
+
7
+ - Fix typescript error ` Type Error: 'Cursor' cannot be used as a JSX component `
8
+
9
+
5
10
## 7.4.0
6
11
7
12
- 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 1
1
{
2
2
"name" : " react-native-confirmation-code-field" ,
3
- "version" : " 7.4 .0" ,
3
+ "version" : " 7.5 .0" ,
4
4
"main" : " esm/index.js" ,
5
5
"types" : " esm/index.d.ts" ,
6
6
"files" : [
Original file line number Diff line number Diff line change 1
- import { useState } from 'react' ;
1
+ import { useState , ReactNode } from 'react' ;
2
2
import { useInterval } from './useTimer' ;
3
3
4
4
export const DEFAULT_BLINKING_SPEED = 500 ;
@@ -7,11 +7,10 @@ export const DEFAULT_CURSOR_SYMBOL = '|';
7
7
export function Cursor ( {
8
8
cursorSymbol = DEFAULT_CURSOR_SYMBOL ,
9
9
delay = DEFAULT_BLINKING_SPEED ,
10
- } ) : React . JSX . Element {
10
+ } ) : ReactNode {
11
11
const [ visibleFlag , setFlag ] = useState ( true ) ;
12
12
13
13
useInterval ( ( ) => setFlag ( ( flag ) => ! flag ) , delay ) ;
14
14
15
- // @ts -expect-error `JSX.Element` is not a `ReactNode`
16
15
return visibleFlag ? cursorSymbol : '' ;
17
16
}
You can’t perform that action at this time.
0 commit comments