Skip to content

Commit

Permalink
fix: restore Cell proptypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Purii committed Oct 16, 2019
1 parent e3950dd commit 460a09d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/components/Cell.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Platform,
SafeAreaView,
Expand All @@ -7,6 +8,7 @@ import {
TouchableHighlight,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';

const Cell = props => {
Expand Down Expand Up @@ -462,6 +464,45 @@ const styles = StyleSheet.create({
},
});

Cell.propTypes = {
accessory: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
accessoryColor: PropTypes.string.isRequired,
accessoryColorDisclosureIndicator: PropTypes.string.isRequired,
allowFontScaling: PropTypes.bool,
cellStyle: PropTypes.string,
cellContentView: PropTypes.element,
cellImageView: PropTypes.element,
cellAccessoryView: PropTypes.element,
contentContainerStyle: ViewPropTypes.style,
backgroundColor: PropTypes.string.isRequired,
detail: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
detailTextStyle: Text.propTypes.style,
disableImageResize: PropTypes.bool,
hideSeparator: PropTypes.bool,
highlightActiveOpacity: PropTypes.number,
highlightUnderlayColor: PropTypes.string,
image: PropTypes.element,
isDisabled: PropTypes.bool,
leftDetailColor: PropTypes.string,
onHighlightRow: PropTypes.func,
onUnHighlightRow: PropTypes.func,
rightDetailColor: PropTypes.string,
subtitleColor: PropTypes.string,
subtitleTextStyle: Text.propTypes.style,
testID: PropTypes.string,
title: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.element,
]),
titleTextColor: PropTypes.string,
titleTextStyle: Text.propTypes.style,
titleTextStyleDisabled: Text.propTypes.style,
onPress: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
onPressDetailAccessory: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
withSafeAreaView: PropTypes.bool,
};

Cell.defaultProps = {
accessory: false,
accessoryColor: '#007AFF',
Expand Down

0 comments on commit 460a09d

Please sign in to comment.