Skip to content

Fix for react native 0.70.1ย #93

Closed
Closed
@alokraj68

Description

@alokraj68

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.

๐Ÿ”บ๏ธ๐Ÿ”บ๏ธ๐Ÿ”บ๏ธ Build issue fixes for latest react native library ๐Ÿ”บ๏ธ๐Ÿ”บ๏ธ๐Ÿ”บ๏ธ

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..f776b52 100644
--- a/node_modules/react-native-button/Button.js
+++ b/node_modules/react-native-button/Button.js
@@ -6,6 +6,7 @@ import {
   TouchableOpacity,
   View,
   ViewPropTypes,
+  TextStyle
 } from 'react-native';
 
 import coalesceNonElementChildren from './coalesceNonElementChildren';
@@ -16,12 +17,12 @@ export default class Button extends Component {
   static propTypes = {
     ...TouchableOpacity.propTypes,
     accessibilityLabel: PropTypes.string,
-    allowFontScaling: Text.propTypes.allowFontScaling,
+    allowFontScaling: PropTypes.bool,
     containerStyle: ViewPropTypes.style,
     disabledContainerStyle: ViewPropTypes.style,
     disabled: PropTypes.bool,
-    style: Text.propTypes.style,
-    styleDisabled: Text.propTypes.style,
+    style: PropTypes.shape(TextStyle),
+    styleDisabled: PropTypes.shape(TextStyle),
     childGroupStyle: ViewPropTypes.style,
   };
 

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions