diff --git a/.detoxrc.js b/.detoxrc.js new file mode 100644 index 0000000..5885451 --- /dev/null +++ b/.detoxrc.js @@ -0,0 +1,83 @@ +/** @type {Detox.DetoxConfig} */ +module.exports = { + testRunner: { + args: { + '$0': 'jest', + config: 'e2e/jest.config.js', + }, + jest: { + setupTimeout: 120000, + }, + }, + apps: { + 'ios.debug': { + type: 'ios.app', + binaryPath: 'example/ios/build/Build/Products/Debug-iphonesimulator/Sheet2Example.app', + build: 'cd example/ios && xcodebuild -workspace Sheet2Example.xcworkspace -scheme Sheet2Example -configuration Debug -sdk iphonesimulator -derivedDataPath ./build -quiet', + }, + 'ios.release': { + type: 'ios.app', + binaryPath: 'example/ios/build/Build/Products/Release-iphonesimulator/Sheet2Example.app', + build: 'cd example/ios && xcodebuild -workspace Sheet2Example.xcworkspace -scheme Sheet2Example -configuration Release -sdk iphonesimulator -derivedDataPath ./build -quiet', + }, + 'android.debug': { + type: 'android.apk', + binaryPath: 'example/android/app/build/outputs/apk/debug/app-debug.apk', + build: 'cd example/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug', + reversePorts: [ + 8081, + ], + }, + 'android.release': { + type: 'android.apk', + binaryPath: 'example/android/app/build/outputs/apk/release/app-release.apk', + build: 'cd example/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release', + }, + }, + devices: { + simulator: { + type: 'ios.simulator', + device: { + type: 'iPhone 16 Pro', + }, + }, + attached: { + type: 'android.attached', + device: { + adbName: '.*', + }, + }, + emulator: { + type: 'android.emulator', + device: { + avdName: 'Pixel_3a_API_30_x86', + }, + }, + }, + configurations: { + 'ios.sim.debug': { + device: 'simulator', + app: 'ios.debug', + }, + 'ios.sim.release': { + device: 'simulator', + app: 'ios.release', + }, + 'android.att.debug': { + device: 'attached', + app: 'android.debug', + }, + 'android.att.release': { + device: 'attached', + app: 'android.release', + }, + 'android.emu.debug': { + device: 'emulator', + app: 'android.debug', + }, + 'android.emu.release': { + device: 'emulator', + app: 'android.release', + }, + }, +}; \ No newline at end of file diff --git a/README.md b/README.md index 96ca975..ac9aa31 100644 --- a/README.md +++ b/README.md @@ -108,16 +108,20 @@ export const NamedExample = () => { For scenarios where you need to show a sheet without pre-declaring a `FittedSheet` component, you can use the global sheet API: ```tsx -import { presentGlobalFittedSheet } from 'react-native-sheet'; +import { + presentGlobalFittedSheet, + dismissGlobalFittedSheet +} from 'react-native-sheet'; import { View, Text, Button } from 'react-native'; export const GlobalSimpleUsage = () => { return (