CourseListLine.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. * @flow
  7. */
  8. import React, { Component } from "react";
  9. import {
  10. StyleSheet,
  11. Text,
  12. View
  13. } from "react-native";
  14. export default class CourseListLine extends Component {
  15. render() {
  16. return (
  17. <View style={styles.courseList}>
  18. <View style={[styles.padding, styles.title, styles.border]}>
  19. <Text style={styles.font}>{this.props.title}</Text>
  20. <Text style={styles.color}>共28课</Text>
  21. </View>
  22. <View style={[styles.padding, styles.title, styles.border]}>
  23. <Text style={styles.courseFont}>{this.props.title}</Text>
  24. <Text style={styles.courseFont}>></Text>
  25. </View>
  26. <View style={[styles.padding, styles.title, styles.border]}>
  27. <Text style={styles.courseFont}>{this.props.title}</Text>
  28. <Text style={styles.courseFont}>></Text>
  29. </View>
  30. <View style={[styles.padding, styles.title, styles.border]}>
  31. <Text style={styles.courseFont}>{this.props.title}</Text>
  32. <Text style={styles.courseFont}>></Text>
  33. </View>
  34. </View>
  35. );
  36. }
  37. }
  38. const styles = StyleSheet.create({
  39. courseList: {
  40. width: '100%',
  41. backgroundColor: '#fff',
  42. marginTop: 8,
  43. },
  44. padding: {
  45. paddingLeft: 20,
  46. paddingRight: 20,
  47. paddingTop: 10,
  48. paddingBottom: 10,
  49. },
  50. title: {
  51. display: 'flex',
  52. flexDirection: 'row',
  53. justifyContent: 'space-between',
  54. alignItems: 'center',
  55. },
  56. font: {
  57. fontSize: 18,
  58. color: 'black',
  59. fontWeight: 'bold',
  60. },
  61. clor: {
  62. fontSize: 14,
  63. color: 'black',
  64. },
  65. courseFont: {
  66. color: '#373737',
  67. fontSize: 16
  68. },
  69. border: {
  70. borderStyle: 'solid',
  71. borderBottomWidth: 1,
  72. borderColor: '#F0F1F5'
  73. }
  74. });