Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 4296a02

Browse files
committed
Replace TextPropTypes with Text.propTypes
1 parent 8e97a93 commit 4296a02

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

src/component/button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
View,
44
TouchableOpacity,
55
ViewPropTypes,
6-
TextPropTypes,
6+
Text as RNText,
77
StyleSheet,
88
} from 'react-native';
99
import PropTypes from 'prop-types';
@@ -58,7 +58,7 @@ export const ButtonText = ({ children, style }) => (
5858

5959
ButtonText.propTypes = {
6060
children: PropTypes.string.isRequired,
61-
style: TextPropTypes.style,
61+
style: RNText.propTypes.style,
6262
};
6363

6464
//

src/component/field.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { TextPropTypes, ViewPropTypes, StyleSheet, View } from 'react-native';
2+
import { Text as RNText, ViewPropTypes, StyleSheet, View } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Text from './text';
55
import { TextInput, HorizontalExpandingTextInput } from './input';
@@ -29,7 +29,7 @@ export const AmountInputField = ({ style, ...props }) => (
2929
);
3030

3131
AmountInputField.propTypes = {
32-
style: TextPropTypes.style,
32+
style: RNText.propTypes.style,
3333
};
3434

3535
//
@@ -50,7 +50,7 @@ export const InputField = ({ style, ...props }) => (
5050

5151
InputField.propTypes = {
5252
children: PropTypes.string,
53-
style: TextPropTypes.style,
53+
style: RNText.propTypes.style,
5454
};
5555

5656
//

src/component/form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, TextPropTypes, ViewPropTypes, StyleSheet } from 'react-native';
2+
import { View, Text as RNText, ViewPropTypes, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Text from './text';
55
import { color, font } from './style';
@@ -46,7 +46,7 @@ export const FormText = ({ children, style }) => (
4646

4747
FormText.propTypes = {
4848
children: PropTypes.string,
49-
style: TextPropTypes.style,
49+
style: RNText.propTypes.style,
5050
};
5151

5252
//
@@ -68,5 +68,5 @@ export const FormSubText = ({ children, style }) => (
6868

6969
FormSubText.propTypes = {
7070
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
71-
style: TextPropTypes.style,
71+
style: RNText.propTypes.style,
7272
};

src/component/input.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react';
22
import {
33
TextInput as RNTextInput,
4-
TextPropTypes,
4+
Text as RNText,
55
StyleSheet,
66
} from 'react-native';
77
import PropTypes from 'prop-types';
@@ -33,7 +33,7 @@ export const TextInput = ({ style, ...props }) => (
3333
);
3434

3535
TextInput.propTypes = {
36-
style: TextPropTypes.style,
36+
style: RNText.propTypes.style,
3737
};
3838

3939
//
@@ -73,7 +73,7 @@ HorizontalExpandingTextInput.propTypes = {
7373
value: PropTypes.string,
7474
charWidth: PropTypes.number.isRequired,
7575
onChangeText: PropTypes.func,
76-
style: TextPropTypes.style,
76+
style: RNText.propTypes.style,
7777
};
7878

7979
export default TextInput;

src/component/label.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, ViewPropTypes, TextPropTypes, StyleSheet } from 'react-native';
2+
import { View, ViewPropTypes, Text as RNText, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Text from './text';
55
import { font } from './style';
@@ -40,15 +40,15 @@ export const BalanceLabelNumeral = ({ children, style }) => (
4040

4141
BalanceLabelNumeral.propTypes = {
4242
children: PropTypes.string.isRequired,
43-
style: TextPropTypes.style,
43+
style: RNText.propTypes.style,
4444
};
4545

4646
export const BalanceLabelUnit = ({ children, style }) =>
4747
children ? <Text style={[balanceStyles.unit, style]}>{children}</Text> : null;
4848

4949
BalanceLabelUnit.propTypes = {
5050
children: PropTypes.string,
51-
style: TextPropTypes.style,
51+
style: RNText.propTypes.style,
5252
};
5353

5454
//
@@ -82,5 +82,5 @@ export const SmallBalanceLabel = ({ children, unit, style }) => (
8282
SmallBalanceLabel.propTypes = {
8383
children: PropTypes.string.isRequired,
8484
unit: PropTypes.string,
85-
style: TextPropTypes.style,
85+
style: RNText.propTypes.style,
8686
};

src/component/text.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Text as RNText, TextPropTypes, StyleSheet } from 'react-native';
2+
import { Text as RNText, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44
import { color, font } from './style';
55
import './font';
@@ -26,7 +26,7 @@ export const Text = ({ children, style, ...props }) => (
2626

2727
Text.propTypes = {
2828
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
29-
style: TextPropTypes.style,
29+
style: RNText.propTypes.style,
3030
};
3131

3232
//
@@ -47,7 +47,7 @@ export const CopyText = ({ children, style }) => (
4747

4848
CopyText.propTypes = {
4949
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
50-
style: TextPropTypes.style,
50+
style: RNText.propTypes.style,
5151
};
5252

5353
//
@@ -68,7 +68,7 @@ export const CopyOnboardText = ({ children = '', style }) => (
6868

6969
CopyOnboardText.propTypes = {
7070
children: PropTypes.string.isRequired,
71-
style: TextPropTypes.style,
71+
style: RNText.propTypes.style,
7272
};
7373

7474
//
@@ -89,7 +89,7 @@ export const H1Text = ({ children = '', style }) => (
8989

9090
H1Text.propTypes = {
9191
children: PropTypes.string.isRequired,
92-
style: TextPropTypes.style,
92+
style: RNText.propTypes.style,
9393
};
9494

9595
//
@@ -110,7 +110,7 @@ export const H3Text = ({ children = '', style }) => (
110110

111111
H3Text.propTypes = {
112112
children: PropTypes.string.isRequired,
113-
style: TextPropTypes.style,
113+
style: RNText.propTypes.style,
114114
};
115115

116116
//
@@ -131,7 +131,7 @@ export const H4Text = ({ children, style }) => (
131131

132132
H4Text.propTypes = {
133133
children: PropTypes.string.isRequired,
134-
style: TextPropTypes.style,
134+
style: RNText.propTypes.style,
135135
};
136136

137137
export default Text;

0 commit comments

Comments
 (0)