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

Deprecated ViewPropTypes from React Native #130

Open
foolem opened this issue Aug 26, 2022 · 0 comments
Open

Deprecated ViewPropTypes from React Native #130

foolem opened this issue Aug 26, 2022 · 0 comments

Comments

@foolem
Copy link

foolem commented Aug 26, 2022

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-swipeable@0.6.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-swipeable/lib/index.js b/node_modules/react-native-swipeable/lib/index.js
index 57996ad..7242753 100644
--- a/node_modules/react-native-swipeable/lib/index.js
+++ b/node_modules/react-native-swipeable/lib/index.js
@@ -16,6 +16,8 @@ var _reactNative = require('react-native');
 
 var _propTypes = require('prop-types');
 
+var _deprecatedPropTypes = require('deprecated-react-native-prop-types');
+
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -603,12 +605,12 @@ Swipeable.propTypes = {
   swipeStartMinDistance: _propTypes.PropTypes.number,
 
   // styles
-  style: _reactNative.ViewPropTypes.style,
-  leftContainerStyle: _reactNative.ViewPropTypes.style,
-  leftButtonContainerStyle: _reactNative.ViewPropTypes.style,
-  rightContainerStyle: _reactNative.ViewPropTypes.style,
-  rightButtonContainerStyle: _reactNative.ViewPropTypes.style,
-  contentContainerStyle: _reactNative.ViewPropTypes.style
+  style: _deprecatedPropTypes.ViewPropTypes.style,
+  leftContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  leftButtonContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  rightContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  rightButtonContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  contentContainerStyle: _deprecatedPropTypes.ViewPropTypes.style
 };
 Swipeable.defaultProps = {
   leftContent: null,

This issue body was partially generated by patch-package.

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

1 participant