8
8
TouchableNativeFeedback ,
9
9
TouchableWithoutFeedback ,
10
10
Dimensions ,
11
- Platform ,
12
11
} from "react-native" ;
13
12
import {
14
13
shadowStyle ,
@@ -86,36 +85,29 @@ export default class ActionButtonItem extends Component {
86
85
} ;
87
86
88
87
if ( position !== "center" )
89
- buttonStyle [ position ] = ( this . props . parentSize - size ) / 2 ;
88
+ animatedViewStyle [ position ] = ( this . props . parentSize - size ) / 2 ;
90
89
91
90
const Touchable = getTouchableComponent ( this . props . useNativeFeedback ) ;
92
91
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 ,
99
96
}
100
- : {
101
- paddingHorizontal : this . props . offsetX ,
102
- height : size + SHADOW_SPACE + spacing
103
- } ;
97
+
104
98
return (
105
99
< Animated . View
106
100
pointerEvents = "box-none"
107
- style = { [ animatedViewStyle , parentStyle ] }
101
+ style = { [ animatedViewStyle ] }
108
102
>
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
+ >
118
109
< Touchable
110
+ testID = { this . props . testID }
119
111
background = { touchableBackground (
120
112
this . props . nativeFeedbackRippleColor ,
121
113
this . props . fixNativeFeedbackRadius
@@ -125,7 +117,7 @@ export default class ActionButtonItem extends Component {
125
117
>
126
118
< View style = { [
127
119
buttonStyle ,
128
- ! hideShadow && Platform . OS === "ios" ? { ...shadowStyle , ...this . props . shadowStyle } : null
120
+ ! hideShadow && ! isAndroid ? { ...shadowStyle , ...this . props . shadowStyle } : null
129
121
] } >
130
122
{ this . props . children }
131
123
</ View >
0 commit comments