MCPcopy Create free account
hub / github.com/code100x/mobile-magic / HapticTab

Function HapticTab

expo-base-app/components/HapticTab.tsx:5–18  ·  view source on GitHub ↗
(props: BottomTabBarButtonProps)

Source from the content-addressed store, hash-verified

3import * as Haptics from 'expo-haptics';
4
5export function HapticTab(props: BottomTabBarButtonProps) {
6 return (
7 <PlatformPressable
8 {...props}
9 onPressIn={(ev) => {
10 if (process.env.EXPO_OS === 'ios') {
11 // Add a soft haptic feedback when pressing down on the tabs.
12 Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
13 }
14 props.onPressIn?.(ev);
15 }}
16 />
17 );
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected