bookingSuccessPage.tsx 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. import { View, Text, ScrollView, Pressable, StyleSheet } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import React from 'react';
  4. import Svg, { Path, Rect } from 'react-native-svg';
  5. import NormalButton from '../global/normal_button';
  6. const TickLogoSvg = () => (
  7. <Svg width="40" height="40" viewBox="0 0 40 40" fill="none">
  8. <Rect width="40" height="40" rx="20" fill="#02677D" />
  9. <Path
  10. d="M15.9169 30L6.41687 20.5L8.79187 18.125L15.9169 25.25L31.2085 9.95837L33.5835 12.3334L15.9169 30Z"
  11. fill="#FAFAFA"
  12. />
  13. </Svg>
  14. );
  15. const BookingSuccessPage = () => {
  16. return (
  17. <SafeAreaView
  18. style={{ flex: 1, backgroundColor: 'white' }}
  19. edges={['top', 'left', 'right']}
  20. >
  21. <ScrollView className="flex-1">
  22. <View>
  23. <View className="flex-row pl-8 pt-8 space-x-4 items-center">
  24. <TickLogoSvg />
  25. <Text className="text-3xl">成功預約</Text>
  26. </View>
  27. <View
  28. className="m-4"
  29. style={{
  30. borderWidth: 1,
  31. borderColor: '#EEEEEE',
  32. borderRadius: 12
  33. }}
  34. >
  35. <View className="space-y-3 py-4 mx-[5%]">
  36. <View className="flex-1 flex-row items-center ">
  37. <View className="flex-1 flex-column">
  38. <Text
  39. style={styles.grayColor}
  40. className="text-xs "
  41. >
  42. 時間日期
  43. </Text>
  44. <Text
  45. style={styles.greenColor}
  46. className="text-4xl pt-2 "
  47. >
  48. 3月14 · 16:15
  49. </Text>
  50. </View>
  51. </View>
  52. <View className="flex-1 flex-column justify-center">
  53. <Text
  54. style={styles.grayColor}
  55. className="text-xs"
  56. >
  57. 充電地點
  58. </Text>
  59. <Text
  60. style={styles.greenColor}
  61. className="text-xl"
  62. >
  63. 上環街市充電站
  64. </Text>
  65. <Text
  66. style={styles.grayColor}
  67. className="text-base"
  68. >
  69. 香港上環皇后大道中345號
  70. </Text>
  71. </View>
  72. <View className="flex-1 flex-row items-center ">
  73. <View className="flex-column flex-1">
  74. <Text
  75. style={styles.grayColor}
  76. className="text-xs"
  77. >
  78. 方案
  79. </Text>
  80. <Text
  81. style={styles.greenColor}
  82. className="text-lg"
  83. >
  84. 按每度電結算
  85. </Text>
  86. <Text
  87. style={styles.grayColor}
  88. className="text-sm"
  89. >
  90. 度數: 50kWh
  91. </Text>
  92. </View>
  93. <View className="flex-column flex-1">
  94. <Text
  95. style={styles.grayColor}
  96. className="text-xs"
  97. >
  98. 車輛
  99. </Text>
  100. <Text
  101. style={styles.greenColor}
  102. className="text-lg"
  103. >
  104. TESLA Model 3
  105. </Text>
  106. </View>
  107. </View>
  108. </View>
  109. </View>
  110. </View>
  111. <View className="mx-[5%]">
  112. <Text className="text-xl py-4">收費概要</Text>
  113. <View className="flex-row justify-between">
  114. <Text className="text-base">充電費用</Text>
  115. <Text className="text-base">HK$ 175</Text>
  116. </View>
  117. <Text style={styles.grayColor} className="text-base">
  118. 按每度電結算: 50 kWh
  119. </Text>
  120. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  121. <View className="flex-row justify-between">
  122. <Text className="text-base" style={styles.grayColor}>
  123. 小計
  124. </Text>
  125. <Text className="text-base">HK$ 175</Text>
  126. </View>
  127. <View className="flex-row justify-between">
  128. <Text className="text-base" style={styles.grayColor}>
  129. 其他費用
  130. </Text>
  131. <Text className="text-base">HK$ 11</Text>
  132. </View>
  133. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  134. <View className="flex-row justify-between ">
  135. <Text className="text-xl">總計</Text>
  136. <Text className="text-xl">HK$ 186</Text>
  137. </View>
  138. <View className="w-full h-1 my-4 bg-[#DBE4E8]" />
  139. <View className="space-y-4">
  140. <Text className="text-xl ">付款資訊</Text>
  141. <View>
  142. <Text
  143. className="text-base"
  144. style={styles.grayColor}
  145. >
  146. 訂單編號
  147. </Text>
  148. <Text className="text-base">CXZ-16336958</Text>
  149. </View>
  150. <View>
  151. <Text
  152. className="text-base"
  153. style={styles.grayColor}
  154. >
  155. 付款方式
  156. </Text>
  157. <Text className="text-base">預付銀包</Text>
  158. </View>
  159. <View>
  160. <Text
  161. className="text-base"
  162. style={styles.grayColor}
  163. >
  164. 電郵地址
  165. </Text>
  166. <Text className="text-base">
  167. mikechan123@gmail.com
  168. </Text>
  169. </View>
  170. </View>
  171. <View className="my-4 pb-8">
  172. <NormalButton
  173. title={
  174. <Text
  175. style={{
  176. color: 'white',
  177. fontSize: 16,
  178. fontWeight: '800'
  179. }}
  180. >
  181. 返回預約
  182. </Text>
  183. }
  184. onPress={() => console.log('abc')}
  185. extendedStyle={{ padding: 24 }}
  186. />
  187. </View>
  188. </View>
  189. </ScrollView>
  190. </SafeAreaView>
  191. );
  192. };
  193. export default BookingSuccessPage;
  194. const styles = StyleSheet.create({
  195. grayColor: {
  196. color: '#888888'
  197. },
  198. greenColor: {
  199. color: '#02677D'
  200. }
  201. });