Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import { StyleSheet, View, Text, Image, TouchableHighlight} from 'react-native'
  3. import { createDrawerNavigator, createAppContainer } from 'react-navigation'
  4. import POSMobileAbout from './POSMobileAbout';
  5. import POSMobileData from './POSMobileData';
  6. import POSMobileBuy from './POSMobileBuy';
  7.  
  8. export default class POSMobile extends Component {
  9. render() {
  10. return (
  11. <MyApp />
  12. )
  13. }
  14. }
  15.  
  16. class ThisPOSMobile extends Component {
  17. render() {
  18. return (
  19. <View style={styles.containerMain}>
  20. <View style={{height:24}}>
  21.  
  22. </View>
  23. <View style={{flex:1, alignItems:'center',
  24. justifyContent:'space-around',
  25. backgroundColor:'orange'}}>
  26. <Text style={{fontSize:30,
  27. color:'white'}}>APLIKASI KASIR</Text>
  28. </View>
  29. <View style={{flex:3, alignItems:'center',
  30. justifyContent:'space-around',
  31. margin:10}}>
  32. <Image style={{width: 240, height: 240}}
  33. source={require('./img/cashier.png')}/>
  34. </View>
  35. <View style={{flex:3}}>
  36. <View style={{flex:1,
  37. flexDirection:'row'}}>
  38. <View style={{flex:1,
  39. alignItems:'center',
  40. justifyContent:'space-around',
  41. backgroundColor:'orange',
  42. borderRadius:20,
  43. margin:5}}>
  44. <TouchableHighlight style={{ flex: 1,
  45. alignItems: 'center',
  46. justifyContent: 'center',
  47. borderRadius: 20,
  48. backgroundColor: 'orange',
  49. margin: 10, }}
  50. onPress={ () => this.props.navigation.navigate('ScreenBuy')}
  51. underlayColor='#F4B400'
  52. ><Text style={{color:'white', fontSize:25}}>Penjualan</Text></TouchableHighlight>
  53. </View>
  54. <View style={{flex:1,
  55. alignItems:'center',
  56. justifyContent:'space-around',
  57. backgroundColor:'orange',
  58. borderRadius:20,
  59. margin:5}}>
  60. <TouchableHighlight style={{ flex: 1,
  61. alignItems: 'center',
  62. justifyContent: 'center',
  63. borderRadius: 20,
  64. backgroundColor: 'orange',
  65. margin: 10, }}
  66. onPress={ () => this.props.navigation.navigate('ScreenData')}
  67. underlayColor='#F4B400'
  68. ><Text style={{color:'white', fontSize:25}}>Daftar Menu</Text></TouchableHighlight>
  69. </View>
  70. </View>
  71. <View style={{flex:1,
  72. justifyContent:'space-around'}}>
  73. <View style={{flex:1,
  74. alignItems:'center',
  75. justifyContent:'space-around',
  76. backgroundColor:'orange',
  77. borderRadius:20,
  78. margin:5}}>
  79. <TouchableHighlight style={{ flex: 1,
  80. alignItems: 'center',
  81. justifyContent: 'center',
  82. borderRadius: 20,
  83. backgroundColor: 'orange',
  84. margin: 10, }}
  85. onPress={ () => this.props.navigation.navigate('ScreenAbout')}
  86. underlayColor='#F4B400'
  87. ><Text style={{color:'white', fontSize:25}}>Tentang Kami</Text></TouchableHighlight>
  88. </View>
  89. </View>
  90. </View>
  91. <View style={{flex:1, alignItems:'center',
  92. justifyContent:'space-around',
  93. backgroundColor:'red'}}>
  94. <Text style={{color:'white', fontSize:14}}>UD.Sri Ferrdian - Jalan Jend. Sudirman Gg 3 No. 7</Text>
  95. </View>
  96. </View>
  97. );
  98. }
  99. }
  100.  
  101. const styles = StyleSheet.create({
  102. containerMain: {
  103. flex: 1,
  104. }
  105. })
  106.  
  107. const MyDrawerNavigator = createDrawerNavigator(
  108. {
  109. ScreenHome: {
  110. screen: ThisPOSMobile,
  111. },
  112. ScreenBuy: {
  113. screen: POSMobileBuy,
  114. },
  115. ScreenData: {
  116. screen: POSMobileData,
  117. },
  118. ScreenAbout: {
  119. screen: POSMobileAbout,
  120. },
  121. },
  122. {
  123. initialRouteName: "ScreenHome",
  124. }
  125. );
  126.  
  127. const MyApp = createAppContainer(MyDrawerNavigator);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement