VideoExplain.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Image,
  14. ScrollView,
  15. FlatList
  16. } from "react-native";
  17. import CusVideo from './CusVideo'
  18. export default class VideoExplain extends Component {
  19. // static propTypes = {
  20. // uri: PropTypes.string,
  21. // title: PropTypes.string,
  22. // details: PropTypes.string,
  23. // };
  24. render() {
  25. return (
  26. <View>
  27. <CusVideo uri={this.props.uri} style={{width: '100%', height: 210}}/>
  28. <View style={styles.videoExplain}>
  29. <View style={styles.title}>
  30. <Text style={styles.font}>{this.props.title}</Text>
  31. <View style={styles.icon}>
  32. <Image src="" style={styles.iconSize}></Image>
  33. <Image src="" style={styles.iconSize}></Image>
  34. </View>
  35. </View>
  36. <View style={[styles.title, styles.tops]}>
  37. <Text style={styles.font}>课程介绍:</Text>
  38. <Text style={styles.clor}>更多 ></Text>
  39. </View>
  40. <Text style={styles.clor}>
  41. {this.props.details}
  42. </Text>
  43. </View>
  44. </View>
  45. );
  46. }
  47. }
  48. const styles = StyleSheet.create({
  49. videoExplain: {
  50. width: '100%',
  51. backgroundColor: 'white',
  52. paddingLeft: 20,
  53. paddingRight: 20,
  54. paddingTop: 13,
  55. paddingBottom: 13
  56. },
  57. title: {
  58. width: '100%',
  59. display: 'flex',
  60. flexDirection: 'row',
  61. justifyContent: 'space-between',
  62. alignItems: 'center'
  63. },
  64. font: {
  65. fontSize: 18,
  66. color: 'black',
  67. fontWeight: 'bold',
  68. },
  69. clor: {
  70. fontSize: 14,
  71. color: 'black',
  72. },
  73. icon: {
  74. display: 'flex',
  75. flexDirection: 'row',
  76. },
  77. iconSize: {
  78. width: 20,
  79. height: 20,
  80. backgroundColor: 'red',
  81. marginLeft: 10
  82. },
  83. tops: {
  84. marginTop: 18,
  85. }
  86. });