eletrotupi / tcc/ frontend/components/misc/haptic-tab.tsx85bf53f6f641a9016e3d0b391f5d75cf12624b57
473 B | 18 lines Raw
1
import { BottomTabBarButtonProps } from 'expo-router/js-tabs';
2
import { Pressable } from 'react-native';
3
import type { Ref } from 'react';
4
import type { View } from 'react-native';
5
import * as Haptics from 'expo-haptics';
6

7
export function HapticTab(props: BottomTabBarButtonProps) {
8
  const { ref, onPressIn, ...rest } = props;
9
  return (
10
    <Pressable
11
      {...rest}
12
      ref={ref as Ref<View>}
13
      onPressIn={(ev) => {
14
        onPressIn?.(ev);
15
      }}
16
    />
17
  );
18
}