Permalink
Browse files

Prevent `SwipeableRow` bleed

Summary: Default image icon size for Quick Actions could cause slideout view to bleed over the slideable view. All styling has been removed and must now be passed in, thus allowing every caller to control size for best fit.

Reviewed By: furdei

Differential Revision: D3315696

fbshipit-source-id: 8f8b3d2cf7a005d42a18d434d9e0080c64597be0
  • Loading branch information...
fred2028 authored and Facebook Github Bot 6 committed May 18, 2016
1 parent dc6a447 commit 514677525a7b524e6f885fab10b98958942e0e1d
Showing with 3 additions and 22 deletions.
  1. +3 −22 Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js
@@ -25,7 +25,6 @@
const Image = require('Image');
const React = require('React');
const StyleSheet = require('StyleSheet');
const Text = require('Text');
const TouchableHighlight = require('TouchableHighlight');
const View = require('View');
@@ -54,13 +53,13 @@ const SwipeableQuickActionButton = React.createClass({
onPress={this.props.onPress}
testID={this.props.testID}
underlayColor="transparent">
<View style={[styles.button, this.props.style]}>
<View style={this.props.style}>
<Image
accessibilityLabel={this.props.accessibilityLabel}
source={this.props.imageSource}
style={[styles.image, this.props.imageStyle]}
style={this.props.imageStyle}
/>
<Text style={[styles.text, this.props.textStyle]}>
<Text style={this.props.textStyle}>
{this.props.text}
</Text>
</View>
@@ -69,22 +68,4 @@ const SwipeableQuickActionButton = React.createClass({
},
});
const styles = StyleSheet.create({
button: {
alignItems: 'center',
flex: 1,
flexDirection: 'column',
width: 76,
},
image: {
height: 33,
width: 33,
},
text: {
color: '#ffffff',
fontSize: 12,
textAlign: 'center', // For Android to align properly
},
});
module.exports = SwipeableQuickActionButton;

0 comments on commit 5146775

Please sign in to comment.