-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
executable file
·55 lines (48 loc) · 1.88 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import 'react-native-gesture-handler';
import * as React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import DocumentScannerScreen from './components/DocumentScanner';
import RectangleScannerScreen from './components/RectangleScanner';
import HomeScreen from './components/Home';
import ImageCropper from './components/ImageCropper';
import ImageEditor from './components/ImageEditor';
import ImageViewer from './components/ImageViewer';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Icon from 'react-native-vector-icons/Ionicons';
Icon.loadFont();
const Tab = createBottomTabNavigator();
const App: () => React$Node = () => {
return (
<NavigationContainer>
<Tab.Navigator
screenOption={({route}) => ({
tabBarIcon: ({focused, color, size}) => {
let iconName;
if (route.name === 'Home') {
iconName = focused
? 'ios-information-circle'
: 'ios-information-circle-outline';
} else if (route.name === 'Document Scanner') {
iconName = focused ? 'ios-camera' : 'ios-reverse-camera';
}
return <Ionicons name={iconName} size={size} color={color} />;
},
})}
tabBarOptions={{
activeTintColor: 'tomato',
inactiveTintColor: 'gray',
}}>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Document Scanner" component={DocumentScannerScreen} />
<Tab.Screen
name="Rectangle Scanner"
component={RectangleScannerScreen}
/>
<Tab.Screen name="Image Cropper" component={ImageCropper} />
<Tab.Screen name="Image Viewer" component={ImageViewer} />
</Tab.Navigator>
</NavigationContainer>
);
};
export default App;