Skip to content

Commit

Permalink
adjust example project usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuczera committed Sep 18, 2024
1 parent 5bb92f6 commit 7668b09
Show file tree
Hide file tree
Showing 7 changed files with 9,794 additions and 3 deletions.
Binary file added example/.yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@react-native/babel-preset": "0.74.86",
"@react-native/eslint-config": "0.74.86",
"@react-native/metro-config": "0.74.86",
"@react-native/typescript-config": "^0.75.3",
"@rnx-kit/metro-config": "^1.3.15",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
Expand Down
6 changes: 4 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import {

import { Colors } from "react-native/Libraries/NewAppScreen";

import HapticFeedback from "react-native-haptic-feedback";
import HapticFeedback, {
HapticFeedbackTypes,
} from "react-native-haptic-feedback";

type SectionProps = PropsWithChildren<{
title: string;
Expand Down Expand Up @@ -62,7 +64,7 @@ function App(): React.JSX.Element {
};

const triggerHapticFeedback = () => {
HapticFeedback.trigger("impactMedium", {
HapticFeedback.trigger(HapticFeedbackTypes.impactMedium, {
enableVibrateFallback: true,
ignoreAndroidSystemSettings: false,
});
Expand Down
13 changes: 13 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@react-native/typescript-config/tsconfig.json",
"compilerOptions": {
"jsx": "react-native",
"lib": ["dom", "esnext"],
"baseUrl": ".",
"paths": {
"react-native-haptic-feedback": ["../src"]
},
"resolveJsonModule": true,
"esModuleInterop": true
}
}
Loading

0 comments on commit 7668b09

Please sign in to comment.