overhaull of project sturcture, segregated screens and components
This commit is contained in:
23
components/CameraView.tsx
Normal file
23
components/CameraView.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import { Camera } from 'expo-camera';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
|
||||
interface CameraViewProps {
|
||||
onBarcodeScanned?: (data: any) => void;
|
||||
barcodeScannerSettings?: any;
|
||||
style?: any;
|
||||
}
|
||||
|
||||
const CameraView: React.FC<CameraViewProps> = ({ onBarcodeScanned, barcodeScannerSettings, style }) => {
|
||||
return (
|
||||
<View style={style}>
|
||||
<Camera
|
||||
style={StyleSheet.absoluteFillObject}
|
||||
onBarCodeScanned={onBarcodeScanned}
|
||||
barCodeScannerSettings={barcodeScannerSettings}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default CameraView;
|
||||
Reference in New Issue
Block a user