paymentSummaryPageComponent.tsx 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import { View, Text, ScrollView, StyleSheet, Pressable } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import Svg, { Path, Rect } from 'react-native-svg';
  4. import NormalButton from '../global/normal_button';
  5. import SlideInImage from '../global/slideInImage';
  6. import { router } from 'expo-router';
  7. import { RightArrowIconSvg, TickLogoSvg } from '../global/SVG';
  8. const PaymentSummaryPageComponent = () => {
  9. return (
  10. <SafeAreaView
  11. className="flex-1 bg-white"
  12. edges={['top', 'left', 'right']}
  13. >
  14. <ScrollView
  15. className="flex-1 mx-[5%]"
  16. showsVerticalScrollIndicator={false}
  17. >
  18. <View style={{ marginTop: 25 }}>
  19. <Text style={{ fontSize: 45 }}>付款概要</Text>
  20. <View className="flex-column">
  21. <View className="items-center pt-6 ">
  22. <SlideInImage
  23. source={require('../../assets/car.png')}
  24. />
  25. </View>
  26. <Pressable onPress={() => console.log('優惠券')}>
  27. <Text className="text-lg pb-4">優惠券</Text>
  28. <View className="bg-[#e9f2f7] rounded-xl h-[9vh] items-center flex-row pl-6 justify-between">
  29. <View className="flex-row ">
  30. <TickLogoSvg />
  31. <Text className="color-[#34667c] px-4 text-base">
  32. $20 迎新優惠券
  33. </Text>
  34. </View>
  35. <View className="pr-8">
  36. <RightArrowIconSvg />
  37. </View>
  38. </View>
  39. </Pressable>
  40. </View>
  41. <View>
  42. <Text className="text-xl py-4">收費概要</Text>
  43. <View className="flex-row justify-between">
  44. <Text className="text-base">充電費用</Text>
  45. <Text className="text-base">HK$ 175</Text>
  46. </View>
  47. <Text style={styles.grayColor} className="text-base">
  48. 按每度電結算: 50 kWh
  49. </Text>
  50. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  51. <View className="flex-row justify-between">
  52. <Text
  53. className="text-base"
  54. style={styles.grayColor}
  55. >
  56. 小計
  57. </Text>
  58. <Text className="text-base">HK$ 175</Text>
  59. </View>
  60. <View className="flex-row justify-between">
  61. <Text
  62. className="text-base"
  63. style={styles.grayColor}
  64. >
  65. 其他費用
  66. </Text>
  67. <Text className="text-base">HK$ 11</Text>
  68. </View>
  69. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  70. <View className="flex-row justify-between ">
  71. <Text className="text-xl">總計</Text>
  72. <Text className="text-3xl">HK$ 186</Text>
  73. </View>
  74. <View className="mt-4 ">
  75. <NormalButton
  76. title={
  77. <Text
  78. style={{
  79. color: 'white',
  80. fontSize: 16,
  81. fontWeight: '800'
  82. }}
  83. >
  84. 前往付款
  85. </Text>
  86. }
  87. onPress={() =>
  88. router.push('/paymentFinishPage')
  89. }
  90. extendedStyle={{ padding: 24 }}
  91. />
  92. </View>
  93. <View className="h-8" />
  94. </View>
  95. </View>
  96. </ScrollView>
  97. </SafeAreaView>
  98. );
  99. };
  100. export default PaymentSummaryPageComponent;
  101. const styles = StyleSheet.create({
  102. grayColor: {
  103. color: '#888888'
  104. },
  105. greenColor: {
  106. color: '#02677D'
  107. }
  108. });