-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
104 lines (97 loc) · 2.93 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Platform } from 'react-native';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import Metronomy from './pages/Metronomy';
import Rhythms from './pages/Rhythms';
import Makams from './pages/Makams';
import Intro from './pages/Intro'
import Notes from './pages/Notes';
import { Icon } from 'react-native-elements'
import { NavigationContainer } from '@react-navigation/native';
import React, { useState } from 'react';
import { registerCustomIconType } from 'react-native-elements';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
registerCustomIconType('font-awesome-5', FontAwesome5)
const Tab = createMaterialTopTabNavigator()
const App = () => {
const [showIntroPage, setShowIntroPage] = useState(true)
const tabNavigatorScreenOpts = {
tabBarShowLabel: false,
tabBarStyle: {
backgroundColor: '#F0DBDB',
paddingTop: 50
},
tabBarIndicatorStyle: {
backgroundColor: `black`,
height: 5
}
}
return (
<>
<NavigationContainer>
{Platform.OS == 'android' && <StatusBar
backgroundColor={'#F0DBDB'}
style={themeFromCache == 'Light' ? 'dark' : 'light'}
/>}
<Tab.Navigator
screenOptions={({ route }) => (tabNavigatorScreenOpts)}>
<Tab.Screen
name="Makams"
children={() => <Makams />}
options={{
tabBarIcon: () =>
<Icon
name='music'
type='font-awesome'
color={'black'}
/>
}} />
<Tab.Screen
name="Rhythms"
children={() => <Rhythms />}
options={{
tabBarIcon: () =>
<Icon
name="drum"
type='font-awesome-5'
color={'black'}
/>
}} />
<Tab.Screen
name="Notes"
children={() => <Notes />}
options={{
tabBarIcon: () =>
<Icon
name="scroll"
type='font-awesome-5'
color={'black'}
/>
}} />
<Tab.Screen
name="Metronomy"
children={() => <Metronomy />}
options={{
tabBarIcon: () =>
<Icon
name='play'
type='font-awesome-5'
color={'black'}
style={{ transform: [{ scale: 0.85 }] }}
/>
}} />
</Tab.Navigator>
<StatusBar style='dark' />
</NavigationContainer>
{showIntroPage && <Intro setShowIntroPage={setShowIntroPage} />}
</>)
}
export default App
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});