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

Commit c7e43c1

Browse files
committed
Replace ViewPropTypes with View.propTypes
1 parent 4296a02 commit c7e43c1

File tree

14 files changed

+42
-54
lines changed

14 files changed

+42
-54
lines changed

src/component/background.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, StyleSheet, ImageBackground, ViewPropTypes } from 'react-native';
2+
import { View, StyleSheet, ImageBackground } from 'react-native';
33
import PropTypes from 'prop-types';
44

55
//
@@ -30,7 +30,7 @@ Background.propTypes = {
3030
image: PropTypes.string,
3131
color: PropTypes.string,
3232
children: PropTypes.node,
33-
style: ViewPropTypes.style,
33+
style: View.propTypes.style,
3434
};
3535

3636
//
@@ -66,7 +66,7 @@ SplitBackground.propTypes = {
6666
color: PropTypes.string,
6767
bottom: PropTypes.string,
6868
children: PropTypes.node,
69-
style: ViewPropTypes.style,
69+
style: View.propTypes.style,
7070
};
7171

7272
export default Background;

src/component/button.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import {
33
View,
44
TouchableOpacity,
5-
ViewPropTypes,
65
Text as RNText,
76
StyleSheet,
87
} from 'react-native';
@@ -38,7 +37,7 @@ Button.propTypes = {
3837
onPress: PropTypes.func.isRequired,
3938
disabled: PropTypes.bool,
4039
children: PropTypes.node,
41-
style: ViewPropTypes.style,
40+
style: View.propTypes.style,
4241
};
4342

4443
//
@@ -98,7 +97,7 @@ GlasButton.propTypes = {
9897
onPress: PropTypes.func.isRequired,
9998
disabled: PropTypes.bool,
10099
children: PropTypes.string.isRequired,
101-
style: ViewPropTypes.style,
100+
style: View.propTypes.style,
102101
};
103102

104103
//
@@ -134,7 +133,7 @@ PillButton.propTypes = {
134133
onPress: PropTypes.func.isRequired,
135134
disabled: PropTypes.bool,
136135
children: PropTypes.string.isRequired,
137-
style: ViewPropTypes.style,
136+
style: View.propTypes.style,
138137
};
139138

140139
//
@@ -209,7 +208,7 @@ SmallButton.propTypes = {
209208
border: PropTypes.bool,
210209
alert: PropTypes.string,
211210
children: PropTypes.node,
212-
style: ViewPropTypes.style,
211+
style: View.propTypes.style,
213212
};
214213

215214
//
@@ -255,7 +254,7 @@ SmallPillButton.propTypes = {
255254
text: PropTypes.string,
256255
onPress: PropTypes.func.isRequired,
257256
disabled: PropTypes.bool,
258-
style: ViewPropTypes.style,
257+
style: View.propTypes.style,
259258
};
260259

261260
//
@@ -278,7 +277,7 @@ export const BackButton = ({ onPress, disabled, style }) => (
278277
BackButton.propTypes = {
279278
onPress: PropTypes.func,
280279
disabled: PropTypes.bool,
281-
style: ViewPropTypes.style,
280+
style: View.propTypes.style,
282281
};
283282

284283
//
@@ -301,7 +300,7 @@ export const CancelButton = ({ onPress, disabled, style }) => (
301300
CancelButton.propTypes = {
302301
onPress: PropTypes.func,
303302
disabled: PropTypes.bool,
304-
style: ViewPropTypes.style,
303+
style: View.propTypes.style,
305304
};
306305

307306
//
@@ -339,7 +338,7 @@ export const QrButton = ({ onPress, disabled, style, children }) => (
339338
QrButton.propTypes = {
340339
onPress: PropTypes.func.isRequired,
341340
disabled: PropTypes.bool,
342-
style: ViewPropTypes.style,
341+
style: View.propTypes.style,
343342
children: PropTypes.string,
344343
};
345344

@@ -368,7 +367,7 @@ export const DownButton = ({ onPress, disabled, style, children }) => (
368367
DownButton.propTypes = {
369368
onPress: PropTypes.func,
370369
disabled: PropTypes.bool,
371-
style: ViewPropTypes.style,
370+
style: View.propTypes.style,
372371
children: PropTypes.string,
373372
};
374373

@@ -419,7 +418,7 @@ CopyButton.propTypes = {
419418
onPress: PropTypes.func,
420419
icon: PropTypes.string,
421420
children: PropTypes.string,
422-
style: ViewPropTypes.style,
421+
style: View.propTypes.style,
423422
};
424423

425424
//

src/component/card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, ViewPropTypes, StyleSheet } from 'react-native';
2+
import { View, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44
import { color } from './style';
55

@@ -22,7 +22,7 @@ const Card = ({ children, style }) => (
2222

2323
Card.propTypes = {
2424
children: PropTypes.node,
25-
style: ViewPropTypes.style,
25+
style: View.propTypes.style,
2626
};
2727

2828
export default Card;

src/component/container.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, ViewPropTypes, StyleSheet } from 'react-native';
2+
import { View, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44

55
const styles = StyleSheet.create({
@@ -15,7 +15,7 @@ const Container = ({ children, style }) => (
1515

1616
Container.propTypes = {
1717
children: PropTypes.node,
18-
style: ViewPropTypes.style,
18+
style: View.propTypes.style,
1919
};
2020

2121
export default Container;

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 { Text as RNText, ViewPropTypes, StyleSheet, View } from 'react-native';
2+
import { Text as RNText, StyleSheet, View } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Text from './text';
55
import { TextInput, HorizontalExpandingTextInput } from './input';
@@ -93,7 +93,7 @@ export const NamedField = ({ name, children, style }) => (
9393
NamedField.propTypes = {
9494
name: PropTypes.string,
9595
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
96-
style: ViewPropTypes.style,
96+
style: View.propTypes.style,
9797
};
9898

9999
//
@@ -130,5 +130,5 @@ export const DetailField = ({ name, children, style }) => (
130130
DetailField.propTypes = {
131131
name: PropTypes.string,
132132
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
133-
style: ViewPropTypes.style,
133+
style: View.propTypes.style,
134134
};

src/component/form.js

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

2626
FormStretcher.propTypes = {
2727
children: PropTypes.node,
28-
style: ViewPropTypes.style,
28+
style: View.propTypes.style,
2929
};
3030

3131
//

src/component/header.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, ViewPropTypes, StyleSheet } from 'react-native';
2+
import { View, StyleSheet } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Text from './text';
55
import { color } from './style';
@@ -43,7 +43,7 @@ export const Header = ({ style, children, color, shadow, separator }) => (
4343
);
4444

4545
Header.propTypes = {
46-
style: ViewPropTypes.style,
46+
style: View.propTypes.style,
4747
children: PropTypes.node,
4848
color: PropTypes.string,
4949
shadow: PropTypes.bool,
@@ -86,7 +86,7 @@ export const Title = ({ title = '', style, children }) => (
8686

8787
Title.propTypes = {
8888
title: PropTypes.string,
89-
style: ViewPropTypes.style,
89+
style: View.propTypes.style,
9090
children: PropTypes.node,
9191
};
9292

src/component/icon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Image, ViewPropTypes } from 'react-native';
2+
import { Image, View } from 'react-native';
33
import PropTypes from 'prop-types';
44

55
const Icon = ({ image, style }) => (
@@ -8,7 +8,7 @@ const Icon = ({ image, style }) => (
88

99
Icon.propTypes = {
1010
image: PropTypes.string.isRequired,
11-
style: ViewPropTypes.style,
11+
style: View.propTypes.style,
1212
};
1313

1414
export default Icon;

src/component/label.js

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

3232
BalanceLabel.propTypes = {
3333
children: PropTypes.node.isRequired,
34-
style: ViewPropTypes.style,
34+
style: View.propTypes.style,
3535
};
3636

3737
export const BalanceLabelNumeral = ({ children, style }) => (

src/component/list.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React, { Component, PureComponent } from 'react';
2-
import {
3-
View,
4-
ListView,
5-
TouchableOpacity,
6-
ViewPropTypes,
7-
StyleSheet,
8-
} from 'react-native';
2+
import { View, ListView, TouchableOpacity, StyleSheet } from 'react-native';
93
import PropTypes from 'prop-types';
104
import Text from './text';
115
import Icon from './icon';
@@ -31,7 +25,7 @@ export const ListContent = ({ children, style }) => (
3125

3226
ListContent.propTypes = {
3327
children: PropTypes.node,
34-
style: ViewPropTypes.style,
28+
style: View.propTypes.style,
3529
};
3630

3731
//
@@ -100,7 +94,7 @@ export class ListItem extends PureComponent {
10094
ListItem.propTypes = {
10195
onSelect: PropTypes.func,
10296
children: PropTypes.node,
103-
style: ViewPropTypes.style,
97+
style: View.propTypes.style,
10498
};
10599

106100
//
@@ -119,7 +113,7 @@ export const ListHeader = ({ style, children }) => (
119113

120114
ListHeader.propTypes = {
121115
children: PropTypes.node,
122-
style: ViewPropTypes.style,
116+
style: View.propTypes.style,
123117
};
124118

125119
//
@@ -187,5 +181,5 @@ export const SettingHeader = ({ name, style }) => (
187181

188182
SettingHeader.propTypes = {
189183
name: PropTypes.string.isRequired,
190-
style: ViewPropTypes.style,
184+
style: View.propTypes.style,
191185
};

0 commit comments

Comments
 (0)