@@ -14,10 +14,12 @@ import { BaseButton } from '../GestureButtons';
14
14
import {
15
15
GestureEvent ,
16
16
HandlerStateChangeEvent ,
17
- } from '../../handlers/gestureHandlerCommon ' ;
17
+ } from '../../handlers/gestureHandlers ' ;
18
18
import { NativeViewGestureHandlerPayload } from '../../handlers/NativeViewGestureHandler' ;
19
19
import { TouchableNativeFeedbackExtraProps } from './TouchableNativeFeedback.android' ;
20
20
21
+ const AnimatedBaseButton = Animated . createAnimatedComponent ( BaseButton ) ;
22
+
21
23
/**
22
24
* Each touchable is a states' machine which preforms transitions.
23
25
* On very beginning (and on the very end or recognition) touchable is
@@ -46,8 +48,6 @@ export interface GenericTouchableProps extends TouchableWithoutFeedbackProps {
46
48
nativeID ?: string ;
47
49
shouldActivateOnStart ?: boolean ;
48
50
disallowInterruption ?: boolean ;
49
-
50
- containerStyle ?: StyleProp < ViewStyle > ;
51
51
}
52
52
53
53
interface InternalProps {
@@ -263,8 +263,8 @@ export default class GenericTouchable extends Component<
263
263
} ;
264
264
265
265
return (
266
- < BaseButton
267
- style = { this . props . containerStyle }
266
+ < AnimatedBaseButton
267
+ style = { this . props . style }
268
268
onHandlerStateChange = {
269
269
// TODO: not sure if it can be undefined instead of null
270
270
this . props . disabled ? undefined : this . onHandlerStateChange
@@ -274,11 +274,10 @@ export default class GenericTouchable extends Component<
274
274
shouldActivateOnStart = { this . props . shouldActivateOnStart }
275
275
disallowInterruption = { this . props . disallowInterruption }
276
276
testID = { this . props . testID }
277
+ { ...coreProps }
277
278
{ ...this . props . extraButtonProps } >
278
- < Animated . View { ...coreProps } style = { this . props . style } >
279
279
{ this . props . children }
280
- </ Animated . View >
281
- </ BaseButton >
280
+ </ AnimatedBaseButton >
282
281
) ;
283
282
}
284
283
}
0 commit comments