| 
1 | 1 | import React, { Component, PropTypes } from 'react';  | 
2 | 2 | import { StyleSheet, Text, View, Animated,   | 
3 | 3 |   TouchableNativeFeedback, TouchableWithoutFeedback, Dimensions, Platform } from 'react-native';  | 
4 |  | -import { shadowStyle, alignItemsMap, Touchable, isAndroid } from './shared';  | 
 | 4 | +import { shadowStyle, alignItemsMap, Touchable, isAndroid, touchableBackground } from './shared';  | 
5 | 5 | 
 
  | 
6 | 6 | const { width: WIDTH } = Dimensions.get('window');  | 
7 | 7 | const SHADOW_SPACE = 10;  | 
@@ -55,15 +55,6 @@ export default class ActionButtonItem extends Component {  | 
55 | 55 | 
 
  | 
56 | 56 |     if (position !== 'center') buttonStyle[position] = (this.props.parentSize-size)/2;  | 
57 | 57 | 
 
  | 
58 |  | -    var touchableBackground;  | 
59 |  | -    if (isAndroid) {  | 
60 |  | -      if (Platform['Version'] >= 21) {  | 
61 |  | -        touchableBackground = TouchableNativeFeedback.Ripple('rgba(255,255,255,0.75)');  | 
62 |  | -      } else {  | 
63 |  | -        touchableBackground = TouchableNativeFeedback.SelectableBackground();  | 
64 |  | -      }  | 
65 |  | -    }  | 
66 |  | - | 
67 | 58 |     return (  | 
68 | 59 |       <Animated.View pointerEvents="box-none" style={animatedViewStyle}>  | 
69 | 60 |         <Touchable  | 
@@ -96,15 +87,6 @@ export default class ActionButtonItem extends Component {  | 
96 | 87 | 
 
  | 
97 | 88 |     const textStyles = [styles.textContainer, positionStyles, textContainerStyle, !hideShadow && shadowStyle];  | 
98 | 89 | 
 
  | 
99 |  | -    var touchableBackground;  | 
100 |  | -    if (isAndroid) {  | 
101 |  | -      if (Platform['Version'] >= 21) {  | 
102 |  | -        touchableBackground = TouchableNativeFeedback.Ripple('rgba(255,255,255,0.75)');  | 
103 |  | -      } else {  | 
104 |  | -        touchableBackground = TouchableNativeFeedback.SelectableBackground();  | 
105 |  | -      }  | 
106 |  | -    }  | 
107 |  | - | 
108 | 90 |     return (  | 
109 | 91 |       <TextTouchable  | 
110 | 92 |         background={touchableBackground}  | 
 | 
0 commit comments