Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. import React, { Component } from "react";
  2. import {
  3. View,
  4. Text,
  5. StyleSheet,
  6. TouchableOpacity,
  7. TextInput,
  8. ScrollView,
  9. } from "react-native";
  10. import Header from './comp/Header';
  11. import Footer from './comp/Footer';
  12.  
  13.  
  14. class BarangScreen extends Component {
  15. static navigationOptions = {
  16. header: null
  17. };
  18.  
  19. render() {
  20. return (
  21. <View style={styles.container}>
  22. <Header judul={"Data Barang"} />
  23. <View style={styles.BarangContainer}>
  24. <Text style={styles.textKode}>Kode : 001</Text>
  25. <Text style={styles.textNamaBarang}>Nama : Kopi Nescape</Text>
  26. </View>
  27. <View style={styles.BarangContainer}>
  28. <Text style={styles.textKode}>Kode : 002</Text>
  29. <Text style={styles.textNamaBarang}>Nama : Sabun Mandi</Text>
  30. </View>
  31. <View style={styles.BarangContainer}>
  32. <Text style={styles.textKode}>KOde : 003</Text>
  33. <Text style={styles.textNamaBarang}>Nama : Indomie</Text>
  34. </View>
  35.  
  36. </View>
  37. );
  38. }
  39. }
  40. // define your styles
  41. const styles = StyleSheet.create({
  42. container: {
  43. flex: 1,
  44. backgroundColor: '#E3F2FD'
  45. },
  46. BarangContainer: {
  47. width: '90%',
  48. justifyContent: 'center',
  49. backgroundColor: '#BDBDBD',
  50. margin: 5,
  51. marginLeft: 20,
  52. height: 100
  53. },
  54. textKode: {
  55. fontSize: 18,
  56. color: 'black',
  57. marginLeft: 10
  58. },
  59. textNamaBarang: {
  60. fontSize: 20,
  61. color: 'black',
  62. fontWeight: 'bold',
  63. marginLeft: 10
  64.  
  65. }
  66.  
  67. });
  68. //make this component available to the app
  69. export default BarangScreen;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement