19 lines
448 B
TypeScript
19 lines
448 B
TypeScript
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
|
|
|
const options = {
|
|
enableVibrateFallback: true,
|
|
ignoreAndroidSystemSettings: false,
|
|
};
|
|
|
|
export const haptics = {
|
|
success() {
|
|
ReactNativeHapticFeedback.trigger('notificationSuccess', options);
|
|
},
|
|
error() {
|
|
ReactNativeHapticFeedback.trigger('notificationError', options);
|
|
},
|
|
selection() {
|
|
ReactNativeHapticFeedback.trigger('selection', options);
|
|
},
|
|
};
|