File tree Expand file tree Collapse file tree 8 files changed +78
-29
lines changed Expand file tree Collapse file tree 8 files changed +78
-29
lines changed Original file line number Diff line number Diff line change 54
54
"homepage" : " https://github.com/frostney/react-intl-native#readme" ,
55
55
"dependencies" : {
56
56
"react-intl" : " ^2.0.0-rc-1" ,
57
- "react-intl-rawformat" : " ^1.0.2" ,
58
57
"react-native" : " ^0.22.2"
59
58
},
60
59
"devDependencies" : {
65
64
"babel-polyfill" : " ^6.7.4" ,
66
65
"babel-preset-es2015-loose" : " ^7.0.0" ,
67
66
"babel-preset-es2015-loose-rollup" : " ^7.0.0" ,
67
+ "babel-preset-react" : " ^6.5.0" ,
68
68
"babel-register" : " ^6.7.2" ,
69
69
"codecov" : " ^1.0.1" ,
70
70
"enzyme" : " ^2.2.0" ,
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedDate } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedDate = props =>
5
- < RawFormattedDate component = { Text } { ...props } /> ;
4
+ const FormattedDate = props => (
5
+ < Intl . FormattedDate { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedDate >
8
+ ) ;
9
+
10
+ FormattedDate . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedDate ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedHTMLMessage } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedHTMLMessage = props =>
5
- < RawFormattedHTMLMessage component = { Text } { ...props } /> ;
4
+ const FormattedHTMLMessage = props => (
5
+ < Intl . FormattedHTMLMessage { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedHTMLMessage >
8
+ ) ;
9
+
10
+ FormattedHTMLMessage . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedHTMLMessage ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedMessage } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedMessage = props =>
5
- < RawFormattedMessage component = { Text } { ...props } /> ;
4
+ const FormattedMessage = props => (
5
+ < Intl . FormattedMessage { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedMessage >
8
+ ) ;
9
+
10
+ FormattedMessage . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedMessage ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedNumber } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedNumber = props =>
5
- < RawFormattedNumber component = { Text } { ...props } /> ;
4
+ const FormattedNumber = props => (
5
+ < Intl . FormattedNumber { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedNumber >
8
+ ) ;
9
+
10
+ FormattedNumber . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedNumber ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedPlural } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedPlural = props =>
5
- < RawFormattedPlural component = { Text } { ...props } /> ;
4
+ const FormattedPlural = props => (
5
+ < Intl . FormattedPlural { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedPlural >
8
+ ) ;
9
+
10
+ FormattedPlural . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedPlural ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedRelative } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedRelative = props =>
5
- < RawFormattedRelative component = { Text } { ...props } /> ;
4
+ const FormattedRelative = props => (
5
+ < Intl . FormattedRelative { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedRelative >
8
+ ) ;
9
+
10
+ FormattedRelative . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedRelative ;
Original file line number Diff line number Diff line change 1
- import React , { Text } from 'react-native' ;
2
- import { RawFormattedTime } from 'react-intl-rawformat ' ;
1
+ import React , { PropTypes , Text } from 'react-native' ;
2
+ import Intl from 'react-intl' ;
3
3
4
- const FormattedTime = props =>
5
- < RawFormattedTime component = { Text } { ...props } /> ;
4
+ const FormattedTime = props => (
5
+ < Intl . FormattedTime { ...props } >
6
+ { localized => < Text style = { props . style } > { localized } </ Text > }
7
+ </ Intl . FormattedTime >
8
+ ) ;
9
+
10
+ FormattedTime . propTypes = {
11
+ style : PropTypes . any ,
12
+ } ;
6
13
7
14
export default FormattedTime ;
You can’t perform that action at this time.
0 commit comments