ordering-ui-react-native 0.17.5-release → 0.17.6-release

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.17.5-release",
3
+ "version": "0.17.6-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -4,6 +4,7 @@ import FontAwesome from 'react-native-vector-icons/FontAwesome';
4
4
  import { CODES } from 'ordering-components/native'
5
5
  import { ORDER_TYPES } from '../config/constants';
6
6
  import { useTheme } from 'styled-components/native';
7
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
7
8
 
8
9
  const [languageState, t] = useLanguage();
9
10
  const theme = useTheme()
@@ -612,3 +613,13 @@ export const lightenDarkenColor = (color: any) => {
612
613
  return false
613
614
  }
614
615
  }
616
+
617
+ export const vibrateApp = (impact ?: string) => {
618
+ const options = {
619
+ enableVibrateFallback: true,
620
+ ignoreAndroidSystemSettings: false
621
+ };
622
+
623
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
624
+
625
+ }