@@ -2,6 +2,7 @@ import React, { useMemo, memo } from 'react';
2
2
import { View , Text , LayoutChangeEvent } from 'react-native' ;
3
3
import Animated from 'react-native-reanimated' ;
4
4
import { interpolateColor , useValue } from 'react-native-redash/lib/module/v1' ;
5
+ import { RectButton } from 'react-native-gesture-handler' ;
5
6
// @ts -ignore 😞
6
7
import isEqual from 'lodash.isequal' ;
7
8
import { interpolate } from '../../../utilities' ;
@@ -30,6 +31,7 @@ const BubbleTabBarItemComponent = ({
30
31
//#endregion
31
32
32
33
//#region variables
34
+ const borderRadius = innerVerticalSpace * 2 + iconSize ;
33
35
const labelWidth = useValue < number > ( 0 ) ;
34
36
/**
35
37
* @DEV
@@ -62,13 +64,14 @@ const BubbleTabBarItemComponent = ({
62
64
} ) ,
63
65
} ,
64
66
] ;
67
+ const buttonStyle = { borderRadius } ;
65
68
const contentContainerStyle = [
66
69
styles . contentContainer ,
67
70
{
68
71
flexDirection : isRTL ? 'row-reverse' : 'row' ,
69
72
paddingHorizontal : innerHorizontalSpace ,
70
73
paddingVertical : innerVerticalSpace ,
71
- borderRadius : innerVerticalSpace * 2 + iconSize ,
74
+ borderRadius,
72
75
backgroundColor : interpolateColor ( animatedFocus , {
73
76
inputRange : [ 0 , 1 ] ,
74
77
outputRange : [ background . inactiveColor , background . activeColor ] ,
@@ -126,9 +129,11 @@ const BubbleTabBarItemComponent = ({
126
129
127
130
return (
128
131
< Animated . View style = { containerStyle } >
129
- < Animated . View style = { contentContainerStyle } >
130
- < View style = { iconContainerStyle } > { renderIcon ( ) } </ View >
131
- </ Animated . View >
132
+ < RectButton rippleColor = { background . activeColor } style = { buttonStyle } >
133
+ < Animated . View style = { contentContainerStyle } >
134
+ < View style = { iconContainerStyle } > { renderIcon ( ) } </ View >
135
+ </ Animated . View >
136
+ </ RectButton >
132
137
< Animated . View style = { labelContainerStyle } >
133
138
< Text onLayout = { handleTextLayout } style = { labelStyle } numberOfLines = { 1 } >
134
139
{ label }
0 commit comments