1
1
import React from 'react' ;
2
2
import ReactNative from 'react-native' ;
3
+ import PropTypes from 'prop-types' ;
3
4
4
5
import TextExtraction from './lib/TextExtraction' ;
5
6
@@ -9,14 +10,14 @@ const PATTERNS = {
9
10
email : / \S + @ \S + \. \S + / ,
10
11
} ;
11
12
12
- const defaultParseShape = React . PropTypes . shape ( {
13
+ const defaultParseShape = PropTypes . shape ( {
13
14
...ReactNative . Text . propTypes ,
14
- type : React . PropTypes . oneOf ( Object . keys ( PATTERNS ) ) . isRequired ,
15
+ type : PropTypes . oneOf ( Object . keys ( PATTERNS ) ) . isRequired ,
15
16
} ) ;
16
17
17
- const customParseShape = React . PropTypes . shape ( {
18
+ const customParseShape = PropTypes . shape ( {
18
19
...ReactNative . Text . propTypes ,
19
- pattern : React . PropTypes . oneOfType ( [ React . PropTypes . string , React . PropTypes . instanceOf ( RegExp ) ] ) . isRequired ,
20
+ pattern : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( RegExp ) ] ) . isRequired ,
20
21
} ) ;
21
22
22
23
class ParsedText extends React . Component {
@@ -25,10 +26,10 @@ class ParsedText extends React.Component {
25
26
26
27
static propTypes = {
27
28
...ReactNative . Text . propTypes ,
28
- parse : React . PropTypes . arrayOf (
29
- React . PropTypes . oneOfType ( [ defaultParseShape , customParseShape ] ) ,
29
+ parse : PropTypes . arrayOf (
30
+ PropTypes . oneOfType ( [ defaultParseShape , customParseShape ] ) ,
30
31
) ,
31
- childrenProps : React . PropTypes . shape ( ReactNative . Text . propTypes ) ,
32
+ childrenProps : PropTypes . shape ( ReactNative . Text . propTypes ) ,
32
33
} ;
33
34
34
35
static defaultProps = {
0 commit comments