Skip to content

Commit 38a78ae

Browse files
committed
replace View.propTypes with ViewPropTypes
1 parent c7ff973 commit 38a78ae

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

RNViewPagerDemo/app/components/common/navigator/XNavigator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
'use strict'
66

7-
import { StyleSheet, Platform, View, Text, Image, BackAndroid } from 'react-native'
7+
import { StyleSheet, Platform, ViewPropTypes, Text, Image, BackAndroid } from 'react-native'
88
import { Navigator } from 'react-native-deprecated-custom-components'
99
import { PropTypes } from 'react'
1010
import React from 'react'
@@ -29,8 +29,8 @@ export default class XNavigator extends React.Component {
2929

3030
static propTypes = {
3131
...Navigator.props,
32-
sceneStyle: View.propTypes.style,
33-
navigationBarStyle: View.propTypes.style,
32+
sceneStyle: ViewPropTypes.style,
33+
navigationBarStyle: ViewPropTypes.style,
3434
titleStyle: Text.propTypes.style,
3535
barButtonTextStyle: Text.propTypes.style,
3636
barButtonIconStyle: Image.propTypes.style,

docs/dotindicator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
| Prop | Type | Default | Note |
55
| --- | --- | --- | --- |
66
| pageCount | number | | |
7-
| dotStyle | View.propTypes.style | | |
8-
| selectedDotStyle | View.propTypes.style | | |
7+
| dotStyle | ViewPropTypes.style | | |
8+
| selectedDotStyle | ViewPropTypes.style | | |
99
| hideSingle | bool | | |
1010

1111

docs/indicatorviewpager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| --- | --- | --- | --- |
44
| ...ViewPager.propTypes | | | |
55
| indicator | PropTypes.node | | |
6-
| pagerStyle | View.propTypes.style | | |
6+
| pagerStyle | ViewPropTypes.style | | |
77
| autoPlayEnable | bool | false | |
88
| autoPlayInterval | number | 3000 | |
99
| horizontalScroll | bool | true | |

docs/tabindicator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
| Prop | Type | Default | Note |
55
| --- | --- | --- | --- |
66
| tabs | PropTypes.arrayOf(PropTypes.shape({text: PropTypes.string,iconSource: Image.propTypes.source,selectedIconSource: Image.propTypes.source})) | | |
7-
| itemStyle | View.propTypes.style | | |
8-
| selectedItemStyle | View.propTypes.style | | |
7+
| itemStyle | ViewPropTypes.style | | |
8+
| selectedItemStyle | ViewPropTypes.style | | |
99
| iconStyle | Image.propTypes.style | | |
1010
| selectedIconStyle | Image.propTypes.style | | |
1111
| textStyle | Text.propTypes.style | | |

docs/titleindicator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
| Prop | Type | Default | Note |
55
| --- | --- | --- | --- |
66
| titles | String Array | | |
7-
| itemStyle | View.propTypes.style | | |
7+
| itemStyle | ViewPropTypes.style | | |
88
| itemTextStyle | Text.propTypes.style | | |
99
| selectedItemTextStyle | Text.propTypes.style | | |
10-
| selectedBorderStyle | View.propTypes.style | | |
10+
| selectedBorderStyle | ViewPropTypes.style | | |
1111
| renderTitle | function | | |
1212

1313

viewpager/IndicatorViewPager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import React, { Component } from 'react'
88
import PropTypes from 'prop-types'
9-
import { StyleSheet, View } from 'react-native'
9+
import { StyleSheet, View, ViewPropTypes } from 'react-native'
1010
import ViewPager from './ViewPager'
1111

1212
const VIEWPAGER_REF = 'viewPager'
@@ -15,7 +15,7 @@ export default class IndicatorViewPager extends Component {
1515
static propTypes = {
1616
...ViewPager.propTypes,
1717
indicator: PropTypes.node,
18-
pagerStyle: View.propTypes.style,
18+
pagerStyle: ViewPropTypes.style,
1919
autoPlayEnable: PropTypes.bool,
2020
autoPlayInterval: PropTypes.number,
2121
horizontalScroll: PropTypes.bool

viewpager/indicator/PagerDotIndicator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
'use strict'
66
import React, { Component } from 'react'
77
import PropTypes from 'prop-types'
8-
import { StyleSheet, View } from 'react-native'
8+
import { StyleSheet, View, ViewPropTypes } from 'react-native'
99
import IndicatorViewPager from '../IndicatorViewPager'
1010

1111
const DEFAULT_DOT_RADIUS = 6
1212
export default class PagerDotIndicator extends Component {
1313
static propTypes = {
14-
...View.propTypes,
14+
...ViewPropTypes,
1515
pageCount: PropTypes.number.isRequired,
1616
initialPage: PropTypes.number,
1717
pager: PropTypes.instanceOf(IndicatorViewPager),
18-
dotStyle: View.propTypes.style,
19-
selectedDotStyle: View.propTypes.style,
18+
dotStyle: ViewPropTypes.style,
19+
selectedDotStyle: ViewPropTypes.style,
2020
hideSingle: PropTypes.bool
2121
}
2222

viewpager/indicator/PagerTabIndicator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
'use strict'
66
import React, { Component } from 'react'
77
import PropTypes from 'prop-types'
8-
import { StyleSheet, View, Image, Text, TouchableOpacity } from 'react-native'
8+
import { StyleSheet, View, ViewPropTypes, Image, Text, TouchableOpacity } from 'react-native'
99
import IndicatorViewPager from '../IndicatorViewPager'
1010

1111
export default class PagerTabIndicator extends Component {
1212
static propTypes = {
13-
...View.propTypes,
13+
...ViewPropTypes,
1414
initialPage: PropTypes.number,
1515
pager: PropTypes.instanceOf(IndicatorViewPager),
1616
tabs: PropTypes.arrayOf(PropTypes.shape({
1717
text: PropTypes.string,
1818
iconSource: Image.propTypes.source,
1919
selectedIconSource: Image.propTypes.source
2020
})).isRequired,
21-
itemStyle: View.propTypes.style,
22-
selectedItemStyle: View.propTypes.style,
21+
itemStyle: ViewPropTypes.style,
22+
selectedItemStyle: ViewPropTypes.style,
2323
iconStyle: Image.propTypes.style,
2424
selectedIconStyle: Image.propTypes.style,
2525
textStyle: Text.propTypes.style,

viewpager/indicator/PagerTitleIndicator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
import React, { Component } from 'react'
88
import PropTypes from 'prop-types'
9-
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'
9+
import { StyleSheet, View, ViewPropTypes, Text, TouchableOpacity } from 'react-native'
1010
import IndicatorViewPager from '../IndicatorViewPager'
1111

1212
export default class PagerTitleIndicator extends Component {
1313
static propTypes = {
14-
...View.propTypes,
14+
...ViewPropTypes,
1515
initialPage: PropTypes.number,
1616
pager: PropTypes.instanceOf(IndicatorViewPager),
1717
titles: PropTypes.arrayOf(PropTypes.string).isRequired,
18-
itemStyle: View.propTypes.style,
19-
selectedItemStyle: View.propTypes.style,
18+
itemStyle: ViewPropTypes.style,
19+
selectedItemStyle: ViewPropTypes.style,
2020
itemTextStyle: Text.propTypes.style,
2121
selectedItemTextStyle: Text.propTypes.style,
22-
selectedBorderStyle: View.propTypes.style,
22+
selectedBorderStyle: ViewPropTypes.style,
2323
renderTitle: PropTypes.func
2424
}
2525

0 commit comments

Comments
 (0)