-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
36 lines (29 loc) · 1.11 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
import { useState } from 'react';
import { BottomNavigation} from 'react-native-paper';
import { createSharedElementStackNavigator, SharedElement } from 'react-navigation-shared-element';
import { NavigationContainer } from '@react-navigation/native';
// SCREENS
import ImageScreen from './src/screens/imageScreen';
import TextScreen from './src/screens/textScreen';
export default function App() {
const [index, setIndex] = useState(0);
const [routes] = useState([
{key: 'images', title: 'Images', focusedIcon: 'image', unfocusedIcon: 'image-outline'},
{key: 'text', title: 'Texts', focusedIcon: 'tooltip-text', unfocusedIcon: 'tooltip-text-outline'}
])
const renderScene = BottomNavigation.SceneMap({
images: ImageScreen,
text: TextScreen
})
return (
<BottomNavigation
navigationState={{index, routes}}
onIndexChange = {setIndex}
renderScene = {renderScene}
shifting = {true}
sceneAnimationEnabled = {true}
sceneAnimationType = {'opacity'}
barStyle = {{height: '10%', backgroundColor: 'rgba(52, 52, 52, 0.2)'}}
/>
);
}