mattermost-mobile/patches/react-native-button+3.0.1.patch
Elias Nahum 8137241f12
[V1] update deps (#6666)
* v1 update dependencies

* fix eslint

* update ci node version

* Fix detox and jest expect imports

* update gradle memory settings

* QA feedback

* android executor xlarge

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2022-10-13 08:40:43 -03:00

59 lines
2 KiB
Diff

diff --git a/node_modules/react-native-button/Button.js b/node_modules/react-native-button/Button.js
index b248176..93a53ee 100644
--- a/node_modules/react-native-button/Button.js
+++ b/node_modules/react-native-button/Button.js
@@ -1,3 +1,4 @@
+import {ViewPropTypes, TextPropTypes} from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
@@ -6,8 +7,7 @@ import {
Text,
TouchableOpacity,
TouchableNativeFeedback,
- View,
- ViewPropTypes
+ View
} from 'react-native';
import coalesceNonElementChildren from './coalesceNonElementChildren';
@@ -18,12 +18,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,
androidBackground: PropTypes.object,
};
@@ -71,7 +71,6 @@ export default class Button extends Component {
}
return (
- <View style={containerStyle}>
<TouchableNativeFeedback
{...touchableProps}
style={{flex: 1}}
@@ -79,11 +78,12 @@ export default class Button extends Component {
accessibilityLabel={this.props.accessibilityLabel}
accessibilityRole="button"
background={background}>
- <View style={{padding: padding}}>
- {this._renderGroupedChildren()}
+ <View style={containerStyle}>
+ <View style={{padding: padding}}>
+ {this._renderGroupedChildren()}
+ </View>
</View>
</TouchableNativeFeedback>
- </View>
);
}
}