diff --git a/example/src/sheets/ScannerSheet.tsx b/example/src/sheets/ScannerSheet.tsx index c37b609..b02648d 100644 --- a/example/src/sheets/ScannerSheet.tsx +++ b/example/src/sheets/ScannerSheet.tsx @@ -1,4 +1,3 @@ -import type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types'; import { forwardRef, useCallback, useState } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { @@ -6,11 +5,13 @@ import { useBottomSheetManager, } from 'react-native-bottom-sheet-stack'; -import { Badge, Button, SecondaryButton, Sheet } from '../components'; +import type { SheetAdapterRef } from '../../../src/adapter.types'; +import { SwmansionSheetAdapter } from '../../../src/adapters/swmansion'; +import { Badge, Button, SecondaryButton } from '../components'; import { ScannerNestedSheet1 } from './ScannerNestedSheets'; import { colors, sharedStyles } from '../styles/theme'; -export const ScannerSheet = forwardRef((_, ref) => { +export const ScannerSheet = forwardRef((_, ref) => { const { close, params } = useBottomSheetContext<'scanner-sheet'>(); const { open } = useBottomSheetManager(); const [isScanning, setIsScanning] = useState(false); @@ -39,92 +40,101 @@ export const ScannerSheet = forwardRef((_, ref) => { }, []); return ( - - - - - - {title} - - This sheet is always mounted (keepMounted). It opens instantly without - mount delay and preserves state between open/close cycles. - + + + + + + + {title} + + This sheet is always mounted (keepMounted). It opens instantly without + mount delay and preserves state between open/close cycles. + - {/* Scanner viewport */} - - {isScanning ? ( - - - Scanning... - - ) : scanResult ? ( - - Scanned Code: - {scanResult} - - ) : ( - - [ ] - Ready to scan - - )} - + {/* Scanner viewport */} + + {isScanning ? ( + + + Scanning... + + ) : scanResult ? ( + + Scanned Code: + {scanResult} + + ) : ( + + [ ] + Ready to scan + + )} + - {/* Actions */} - - {scanResult ? ( - <> -