Order.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 Order extends Component {
  15. render() {
  16. return (
  17. <View style={[ styles.courseList, {left: this.props.left}]}>
  18. <View style={[styles.btn, { backgroundColor: '#F5CA0D'}]}>
  19. <Text style={{color: '#fff', fontSize: 18}}>立即购买</Text>
  20. </View>
  21. <View style={[styles.btn, { backgroundColor: '#F5880D'}]}>
  22. <Text style={{color: '#fff', fontSize: 18}}>一元秒杀</Text>
  23. </View>
  24. </View>
  25. );
  26. }
  27. }
  28. const styles = StyleSheet.create({
  29. courseList: {
  30. position: 'absolute',
  31. bottom: 0,
  32. width: '100%',
  33. height: 57,
  34. backgroundColor: '#fff',
  35. display: 'flex',
  36. flexDirection: 'row',
  37. justifyContent: 'space-between',
  38. alignItems: 'center',
  39. paddingLeft: 20,
  40. paddingRight: 20,
  41. borderStyle: 'solid',
  42. borderTopWidth: 1,
  43. borderColor: '#000000'
  44. },
  45. btn: {
  46. width: '45%',
  47. height: 35,
  48. borderRadius: 35,
  49. display: 'flex',
  50. flexDirection: 'row',
  51. alignItems: 'center',
  52. justifyContent: 'center',
  53. }
  54. });