Skip to content

Commit

Permalink
Switch to using ViewPropTypes. (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
RnMss authored and andrewgrewell committed Nov 14, 2017
1 parent 52a0b5d commit 366712b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/SwipeList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, View, ListView, ScrollView } from 'react-native';
import { StyleSheet, View, ListView, ScrollView, ViewPropTypes } from 'react-native';
import createReactClass from 'create-react-class';
import shallowCompare from 'react-addons-shallow-compare';
import reduce from 'lodash/reduce';
Expand Down Expand Up @@ -38,8 +38,8 @@ const SwipeList = createReactClass({
}
}
},
style: View.propTypes.style,
rowStyle: View.propTypes.style,
style: ViewPropTypes.style,
rowStyle: ViewPropTypes.style,
scrollEnabled: PropTypes.bool,
onScrollStateChange: PropTypes.func,
gestureTensionParams: PropTypes.shape({
Expand Down Expand Up @@ -320,4 +320,4 @@ const styles = StyleSheet.create({

SwipeList.SwipeState = SWIPE_STATE;

export default SwipeList;
export default SwipeList;
9 changes: 5 additions & 4 deletions src/components/SwipeRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
StyleSheet,
View,
Animated,
Easing
Easing,
ViewPropTypes
} from 'react-native';

import createReactClass from 'create-react-class';
Expand Down Expand Up @@ -42,12 +43,12 @@ const defaultSubViewOptions = {
const SwipeRow = createReactClass({

propTypes: {
style: View.propTypes.style,
style: ViewPropTypes.style,
id: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string
]).isRequired,
rowViewStyle: View.propTypes.style,
rowViewStyle: ViewPropTypes.style,
gestureTensionParams: PropTypes.shape({
threshold: PropTypes.number,
stretch: PropTypes.number,
Expand Down Expand Up @@ -636,4 +637,4 @@ const styles = StyleSheet.create({
});


export default SwipeRow;
export default SwipeRow;

0 comments on commit 366712b

Please sign in to comment.