Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props Types depreciated #58

Open
Gnative opened this issue Sep 7, 2022 · 1 comment
Open

Props Types depreciated #58

Gnative opened this issue Sep 7, 2022 · 1 comment

Comments

@Gnative
Copy link

Gnative commented Sep 7, 2022

In case anyone comes looking here is a patch-package for React Natives removal of PropTypes

diff --git a/node_modules/react-native-settings-list/index.js b/node_modules/react-native-settings-list/index.js
index 00e7242..0c61679 100644
--- a/node_modules/react-native-settings-list/index.js
+++ b/node_modules/react-native-settings-list/index.js
@@ -12,19 +12,19 @@ import {
   ScrollView,
   TextInput,
   Switch,
-  Image,
-  ViewPropTypes
+  Image
 } from 'react-native';
-
+import { ImagePropTypes, TextPropTypes, ViewPropTypes } from 'deprecated-react-native-prop-types'
 const ARROW_ICON = require('./img/icon-arrow-settings.png');
 
+console.log('Settings', ViewPropTypes.style)
 class SettingsList extends React.Component {
   static propTypes = {
     backgroundColor: PropTypes.string,
     borderColor: PropTypes.string,
     defaultItemSize: PropTypes.number,
     underlayColor: PropTypes.string,
-    defaultTitleStyle: Text.propTypes.style,
+    defaultTitleStyle: TextPropTypes.style,
     defaultTitleInfoPosition: PropTypes.string,
     scrollViewProps: PropTypes.object,
   };
@@ -276,7 +276,7 @@ const styles = StyleSheet.create({
 SettingsList.Header = createReactClass({
   propTypes: {
     headerText: PropTypes.string,
-    headerStyle: Text.propTypes.style,
+    headerStyle: TextPropTypes.style,
     headerRef: PropTypes.func,
     headerNumberOfLines: PropTypes.number,
   },
@@ -302,7 +302,7 @@ SettingsList.Item = createReactClass({
      * Title being displayed
      */
     title: PropTypes.string,
-    titleStyle: Text.propTypes.style,
+    titleStyle: TextPropTypes.style,
     /**
      * Icon displayed on the left of the settings item
      */
@@ -323,7 +323,7 @@ SettingsList.Item = createReactClass({
     /**
      * Editable Right Side Style
      */
-    editableTextStyle: Text.propTypes.style,
+    editableTextStyle: TextPropTypes.style,
 
     /**
      * Individual item width.  Can be globally set in the parent.  Will become deprecated
@@ -358,7 +358,7 @@ SettingsList.Item = createReactClass({
     hasNavArrow: PropTypes.bool,
     arrowIcon: PropTypes.node,
 
-    arrowStyle: Image.propTypes.style,
+    arrowStyle: ImagePropTypes.style,
     /**
      * Enable or disable a Switch component
      */
@@ -379,7 +379,7 @@ SettingsList.Item = createReactClass({
      * Right side information on the setting item
      */
     titleInfo: PropTypes.string,
-    titleInfoStyle: Text.propTypes.style,
+    titleInfoStyle: TextPropTypes.style,
     /**
      * If 'Bottom', info is placed beneath the title
      */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Gnative and others