Mempersiapkan menu navigasi
This commit is contained in:
		
							parent
							
								
									18975fafe0
								
							
						
					
					
						commit
						e04f88caa4
					
				
							
								
								
									
										14
									
								
								App.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								App.js
									
									
									
									
									
								
							@ -5,7 +5,12 @@ import { NavigationContainer } from '@react-navigation/native';
 | 
			
		||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
 | 
			
		||||
 | 
			
		||||
import ScreenHome from './screens/ScreenHome';
 | 
			
		||||
import ScreenContoh from './screens/ScreenContoh';
 | 
			
		||||
import ScreenProfile from './screens/ScreenProfile';
 | 
			
		||||
import ScreenMassa from './screens/ScreenMassa';
 | 
			
		||||
import ScreenSuhu from './screens/ScreenSuhu';
 | 
			
		||||
import ScreenPuasa from './screens/ScreenPuasa';
 | 
			
		||||
import ScreenTensi from './screens/ScreenTensi';
 | 
			
		||||
import ScreenGula from './screens/ScreenGula';
 | 
			
		||||
 | 
			
		||||
const Stack = createNativeStackNavigator();
 | 
			
		||||
 | 
			
		||||
@ -14,7 +19,12 @@ const App = () => {
 | 
			
		||||
    <NavigationContainer>
 | 
			
		||||
      <Stack.Navigator initialRouteName="Home">
 | 
			
		||||
        <Stack.Screen name="Home" component={ScreenHome} />
 | 
			
		||||
        <Stack.Screen name="Contoh" component={ScreenContoh} />
 | 
			
		||||
        <Stack.Screen name="Profile" component={ScreenProfile} />
 | 
			
		||||
        <Stack.Screen name="Massa" component={ScreenMassa} />
 | 
			
		||||
        <Stack.Screen name="Suhu" component={ScreenSuhu} />
 | 
			
		||||
        <Stack.Screen name="Puasa" component={ScreenPuasa} />
 | 
			
		||||
        <Stack.Screen name="Tensi" component={ScreenTensi} />
 | 
			
		||||
        <Stack.Screen name="Gula" component={ScreenGula} />
 | 
			
		||||
      </Stack.Navigator>
 | 
			
		||||
    </NavigationContainer>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/height.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/height.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 21 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/male.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/male.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 33 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/medicine.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/medicine.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 42 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/sphygmomanometer.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/sphygmomanometer.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/sugar-blood-level.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/sugar-blood-level.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/illustration/menu/thermometer.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/illustration/menu/thermometer.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 24 KiB  | 
							
								
								
									
										22
									
								
								screens/ScreenGula.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenGula.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenGula = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Cek Gula Darah</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenGula;
 | 
			
		||||
@ -6,21 +6,39 @@ const ScreenHome = ({ navigation }) => {
 | 
			
		||||
    const menuItems = [
 | 
			
		||||
        {
 | 
			
		||||
            key: '1',
 | 
			
		||||
            title: 'Apa aja',
 | 
			
		||||
            icon: require('../assets/illustration/cheeky.png'),
 | 
			
		||||
            screen: 'Contoh',
 | 
			
		||||
            title: 'Profile',
 | 
			
		||||
            icon: require('../assets/illustration/menu/male.png'),
 | 
			
		||||
            screen: 'Profile',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            key: '2',
 | 
			
		||||
            title: 'Boleh',
 | 
			
		||||
            icon: require('../assets/illustration/cheeky.png'),
 | 
			
		||||
            screen: 'Contoh',
 | 
			
		||||
            title: 'Berat Badan Ideal',
 | 
			
		||||
            icon: require('../assets/illustration/menu/height.png'),
 | 
			
		||||
            screen: 'Massa',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            key: '3',
 | 
			
		||||
            title: 'Boleh',
 | 
			
		||||
            icon: require('../assets/illustration/cheeky.png'),
 | 
			
		||||
            screen: 'Contoh',
 | 
			
		||||
            title: 'Suhu Badan',
 | 
			
		||||
            icon: require('../assets/illustration/menu/thermometer.png'),
 | 
			
		||||
            screen: 'Suhu',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            key: '4',
 | 
			
		||||
            title: 'Riwayat Puasa',
 | 
			
		||||
            icon: require('../assets/illustration/menu/medicine.png'),
 | 
			
		||||
            screen: 'Puasa',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            key: '5',
 | 
			
		||||
            title: 'Tensi',
 | 
			
		||||
            icon: require('../assets/illustration/menu/sphygmomanometer.png'),
 | 
			
		||||
            screen: 'Tensi',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            key: '6',
 | 
			
		||||
            title: 'Gula Darah',
 | 
			
		||||
            icon: require('../assets/illustration/menu/sugar-blood-level.png'),
 | 
			
		||||
            screen: 'Gula',
 | 
			
		||||
        }
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
@ -99,4 +117,4 @@ const styles = StyleSheet.create({
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenHome;
 | 
			
		||||
export default ScreenHome;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										22
									
								
								screens/ScreenMassa.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenMassa.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenMassa = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Massa</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenMassa;
 | 
			
		||||
							
								
								
									
										22
									
								
								screens/ScreenProfile.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenProfile.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenProfile = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Profile</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenProfile;
 | 
			
		||||
							
								
								
									
										22
									
								
								screens/ScreenPuasa.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenPuasa.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenPuasa = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Puasa</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenPuasa;
 | 
			
		||||
							
								
								
									
										22
									
								
								screens/ScreenSuhu.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenSuhu.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenSuhu = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Suhu</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenSuhu;
 | 
			
		||||
							
								
								
									
										22
									
								
								screens/ScreenTensi.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								screens/ScreenTensi.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
import { StatusBar } from 'expo-status-bar';
 | 
			
		||||
import { StyleSheet, Text, View } from 'react-native';
 | 
			
		||||
 | 
			
		||||
const ScreenTensi = ({ navigation }) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={styles.container}>
 | 
			
		||||
      <Text>Ini halaman Tensi</Text>
 | 
			
		||||
      <StatusBar style="auto" />
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
  container: {
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    backgroundColor: '#fff',
 | 
			
		||||
    alignItems: 'center',
 | 
			
		||||
    justifyContent: 'center',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default ScreenTensi;
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user