88 TouchableNativeFeedback ,
99 TouchableWithoutFeedback ,
1010 Dimensions ,
11- Platform ,
1211} from "react-native" ;
1312import {
1413 shadowStyle ,
@@ -86,36 +85,29 @@ export default class ActionButtonItem extends Component {
8685 } ;
8786
8887 if ( position !== "center" )
89- buttonStyle [ position ] = ( this . props . parentSize - size ) / 2 ;
88+ animatedViewStyle [ position ] = ( this . props . parentSize - size ) / 2 ;
9089
9190 const Touchable = getTouchableComponent ( this . props . useNativeFeedback ) ;
9291
93- const parentStyle = isAndroid &&
94- this . props . fixNativeFeedbackRadius
95- ? {
96- paddingHorizontal : this . props . offsetX ,
97- height : size + SHADOW_SPACE + spacing ,
98- borderRadius : this . props . size / 2
92+ const parentStyle = {
93+ marginHorizontal : this . props . offsetX ,
94+ marginBottom : spacing + SHADOW_SPACE ,
95+ borderRadius : this . props . size / 2 ,
9996 }
100- : {
101- paddingHorizontal : this . props . offsetX ,
102- height : size + SHADOW_SPACE + spacing
103- } ;
97+
10498 return (
10599 < Animated . View
106100 pointerEvents = "box-none"
107- style = { [ animatedViewStyle , parentStyle ] }
101+ style = { [ animatedViewStyle ] }
108102 >
109- < View
110- style = { [ {
111- width : this . props . size ,
112- height : this . props . size ,
113- borderRadius : size / 2
114- } ,
115- ! hideShadow && Platform . OS === "android" ? { ...shadowStyle , ...this . props . shadowStyle } : null
116- ] }
117- >
103+ < View
104+ style = { [
105+ parentStyle ,
106+ ! hideShadow && isAndroid ? { ...shadowStyle , ...this . props . shadowStyle } : null
107+ ] }
108+ >
118109 < Touchable
110+ testID = { this . props . testID }
119111 background = { touchableBackground (
120112 this . props . nativeFeedbackRippleColor ,
121113 this . props . fixNativeFeedbackRadius
@@ -125,7 +117,7 @@ export default class ActionButtonItem extends Component {
125117 >
126118 < View style = { [
127119 buttonStyle ,
128- ! hideShadow && Platform . OS === "ios" ? { ...shadowStyle , ...this . props . shadowStyle } : null
120+ ! hideShadow && ! isAndroid ? { ...shadowStyle , ...this . props . shadowStyle } : null
129121 ] } >
130122 { this . props . children }
131123 </ View >
0 commit comments