expectedFeeBox.tsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { View, Text, StyleProp, ViewStyle } from 'react-native';
  2. import React from 'react';
  3. interface ExpectedFeeBoxProps {
  4. extendedStyle?: StyleProp<ViewStyle>;
  5. price: string | number | undefined;
  6. }
  7. // SearchPage: React.FC<SearchPageProps>
  8. //this is a reuseable component "預計充電費用" 灰色格仔 on Charging Page
  9. const ExpectedFeeBox: React.FC<ExpectedFeeBoxProps> = ({ extendedStyle, price }) => {
  10. return (
  11. <View
  12. className=" min-h-[20px] border-slate-300 rounded-2xl justify-center"
  13. style={[{ borderWidth: 1 }, extendedStyle]}
  14. >
  15. <View className="flex-row items-center justify-between">
  16. <View>
  17. <Text className="text-lg">預計充電費用</Text>
  18. <Text className="text-base color-[#888888]">按每度電結算: 50 kWh</Text>
  19. </View>
  20. <Text className="text-3xl">HK$ {price}</Text>
  21. </View>
  22. </View>
  23. );
  24. };
  25. export default ExpectedFeeBox;
  26. [
  27. undefined,
  28. {
  29. business_hours_fk: 'test',
  30. createdAt: '2024-07-11T09:58:53.871Z',
  31. id: '2405311022116801000',
  32. image: ' ',
  33. price: 3,
  34. qr_code: 'test',
  35. self_active_status_fk: 'test',
  36. snapshot: {
  37. Address: '香港觀塘偉業街143號',
  38. AreaCode: '810000',
  39. BusineHours: '24小时营业',
  40. Construction: 3,
  41. CountryCode: 'CN',
  42. ElectricityFee: '',
  43. EquipmentInfos: [Array],
  44. EquipmentOwnerID: '730998640',
  45. MatchCars: '限小型车辆',
  46. OperatorID: '192316877',
  47. ParkFee: '首小时5元,之后1元/小时',
  48. ParkInfo: '地面1层',
  49. ParkNums: 20,
  50. Payment: '微信/云闪付/智能卡/VIN码',
  51. Remark: '',
  52. ServiceFee: '',
  53. ServiceTel: '13410029675',
  54. SiteGuide: '香港觀塘偉業街143號',
  55. StationID: '2405311022116801000',
  56. StationLat: 22.310709,
  57. StationLng: 114.22301,
  58. StationName: 'CRAZY CHARGE (偉業街)',
  59. StationStatus: 50,
  60. StationTel: '13823514949',
  61. StationType: 1,
  62. SupportOrder: 0
  63. },
  64. updatedAt: '2024-08-16T08:18:07.976Z'
  65. }
  66. ];