Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. import React, { Component } from "react";
  2. import {
  3. View,
  4. Text,
  5. StyleSheet,
  6. Image,
  7. TouchableHighlight,
  8. TextInput,
  9. Platform,
  10. } from "react-native";
  11. import Header from "./Header";
  12. class Barang extends Component {
  13. static navigationOptions = {
  14. header: null
  15. }
  16. render() {
  17. return (
  18. <View style={styles.container}>
  19. <Header judul={"Data Barang"} />
  20. <View style={styles.box1}>
  21. <View style={styles.barangContainer}>
  22. <Text style={styles.styleText}>666</Text>
  23. <Text style={styles.styleText2}>Yeezy</Text>
  24. </View>
  25. <View style={styles.barangContainer}>
  26. <Text style={styles.styleText}>999</Text>
  27. <Text style={styles.styleText2}>Supreme</Text>
  28. </View>
  29. <View style={styles.barangContainer}>
  30. <Text style={styles.styleText}>888</Text>
  31. <Text style={styles.styleText2}>Swallow</Text>
  32. </View>
  33. </View>
  34. </View>
  35. );
  36. }
  37. }
  38. // define your styles
  39. const styles = StyleSheet.create({
  40. container: {
  41. flex: 1,
  42. margin: 10,
  43. flexDirection: "column",
  44. },
  45. barangContainer: {
  46. backgroundColor: "#e8e6e5",
  47. justifyContent: 'flex-start',
  48. width: 280,
  49. height: 100,
  50. paddingBottom: 20,
  51. paddingTop: 20,
  52. paddingLeft: 10,
  53. borderRadius: 5
  54. },
  55. styleText: {
  56. fontSize: 18
  57. },
  58. styleText2: {
  59. fontSize: 20,
  60. fontWeight: 'bold'
  61. },
  62. box1: {
  63. flex: 0.7,
  64. width: "90%",
  65. paddingTop: 20,
  66. marginTop: 10,
  67. marginLeft: 2,
  68. justifyContent: "space-around",
  69. flexDirection: "column"
  70. },
  71. box2: {
  72. flex: 1,
  73. marginLeft: 10,
  74. marginRight: 10,
  75. marginTop: 20,
  76. paddingLeft: 10,
  77. justifyContent: "space-around",
  78. flexDirection: "column",
  79. },
  80. box3: {
  81. flex: 1,
  82. marginLeft: 10,
  83. marginRight: 10,
  84. marginTop: 20,
  85. marginBottom: 120,
  86. justifyContent: "space-around",
  87. flexDirection: "column",
  88. alignItems: "center"
  89. },
  90. });
  91. export default Barang;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement