@@ -20,7 +20,7 @@ export const PeriodSelectorActiveIndicator = ({
2020 borderRadius = 1000 ,
2121} : TabsActiveIndicatorProps ) => {
2222 const theme = useTheme ( ) ;
23- const { width, height, x } = activeTabRect ;
23+ const { width, height, x, y } = activeTabRect ;
2424
2525 // Get the target background color
2626 const backgroundColorKey = background as keyof typeof theme . color ;
@@ -31,7 +31,7 @@ export const PeriodSelectorActiveIndicator = ({
3131 const previousColor = React . useRef ( targetColor ) ;
3232
3333 // Combined animated value for position, size, and color
34- const newAnimatedValues = { x, width, backgroundColor : targetColor } ;
34+ const newAnimatedValues = { x, y , width, backgroundColor : targetColor } ;
3535 const animatedValues = useSharedValue ( newAnimatedValues ) ;
3636
3737 const isFirstRenderWithWidth =
@@ -47,7 +47,7 @@ export const PeriodSelectorActiveIndicator = ({
4747
4848 const animatedStyles = useAnimatedStyle (
4949 ( ) => ( {
50- transform : [ { translateX : animatedValues . value . x } ] ,
50+ transform : [ { translateX : animatedValues . value . x } , { translateY : animatedValues . value . y } ] ,
5151 width : animatedValues . value . width ,
5252 backgroundColor : animatedValues . value . backgroundColor ,
5353 } ) ,
0 commit comments