ide / react-native-button

A button for React apps
MIT License
773 stars 129 forks source link

react-native version 0.69.0 support #95

Closed atombreak closed 1 year ago

atombreak commented 1 year ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

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

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-button/Button.js b/node_modules/react-native-button/Button.js
index fb7cf46..3609e38 100644
--- a/node_modules/react-native-button/Button.js
+++ b/node_modules/react-native-button/Button.js
@@ -1,4 +1,5 @@
 import PropTypes from 'prop-types';
+import {TextPropTypes} from 'deprecated-react-native-prop-types'
 import React, { Component } from 'react';
 import {
   StyleSheet,
@@ -16,12 +17,12 @@ export default class Button extends Component {
   static propTypes = {
     ...TouchableOpacity.propTypes,
     accessibilityLabel: PropTypes.string,
-    allowFontScaling: Text.propTypes.allowFontScaling,
+    allowFontScaling: TextPropTypes.allowFontScaling,
     containerStyle: ViewPropTypes.style,
     disabledContainerStyle: ViewPropTypes.style,
     disabled: PropTypes.bool,
-    style: Text.propTypes.style,
-    styleDisabled: Text.propTypes.style,
+    style: TextPropTypes.style,
+    styleDisabled: TextPropTypes.style,
     childGroupStyle: ViewPropTypes.style,
   };

This issue body was partially generated by patch-package.

ide commented 1 year ago

Please send a PR with the text "Closes #95" to address this.

ide commented 1 year ago

Addressed by https://github.com/ide/react-native-button/pull/96