walletPageComponent.tsx 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import {
  2. View,
  3. Text,
  4. ScrollView,
  5. Image,
  6. Pressable,
  7. ImageBackground
  8. } from 'react-native';
  9. import React from 'react';
  10. import { SafeAreaView } from 'react-native-safe-area-context';
  11. import Svg, { Path } from 'react-native-svg';
  12. const CrossLogoSvg = () => (
  13. <Svg width="24" height="24" viewBox="0 0 24 24" fill="none">
  14. <Path
  15. d="M2.33333 23.3333L0 21L9.33333 11.6667L0 2.33333L2.33333 0L11.6667 9.33333L21 0L23.3333 2.33333L14 11.6667L23.3333 21L21 23.3333L11.6667 14L2.33333 23.3333Z"
  16. fill="#222222"
  17. />
  18. </Svg>
  19. );
  20. const WalletPageComponent = () => {
  21. const image = { uri: 'https://legacy.reactjs.org/logo-og.png' };
  22. return (
  23. <SafeAreaView
  24. className="flex-1 bg-white"
  25. edges={['top', 'right', 'left']}
  26. >
  27. <ScrollView className="flex-1 ">
  28. <View className="flex-1 mx-[5%]">
  29. <View style={{ marginTop: 25 }}>
  30. <CrossLogoSvg />
  31. <Text style={{ fontSize: 45, marginVertical: 25 }}>
  32. 錢包
  33. </Text>
  34. </View>
  35. <View>
  36. <ImageBackground
  37. className="flex-col-reverse shadow-lg"
  38. style={{ height: 200 }}
  39. source={require('../../assets/walletCard1.png')}
  40. resizeMode="contain"
  41. >
  42. <View className="mx-[5%] pb-6">
  43. <Text className="text-white text-xl">
  44. 餘額 (HKD)
  45. </Text>
  46. <View className="flex-row items-center justify-between ">
  47. <Text
  48. style={{ fontSize: 52 }}
  49. className=" text-white font-bold"
  50. >
  51. $2711.8
  52. </Text>
  53. <Pressable
  54. className="rounded-2xl items-center justify-center p-3 pr-4 "
  55. style={{
  56. backgroundColor:
  57. 'rgba(231, 242, 248, 0.2)'
  58. }}
  59. onPress={() => console.log('增值')}
  60. >
  61. <Text className="text-white font-bold">
  62. + 增值
  63. </Text>
  64. </Pressable>
  65. </View>
  66. </View>
  67. </ImageBackground>
  68. </View>
  69. <View className="flex-row-reverse mt-2 mb-6">
  70. <Text className="text-[#02677D] text-lg underline">
  71. 更多錢包資訊
  72. </Text>
  73. </View>
  74. </View>
  75. <View className="w-full h-1 bg-[#DBE4E8]" />
  76. <View className="flex-row justify-between mx-[5%] mt-6 mb-2">
  77. <Text className="text-xl">優惠券</Text>
  78. <Pressable onPress={() => console.log('顯示所有')}>
  79. <Text className="text-xl text-[#888888]">顯示所有</Text>
  80. </Pressable>
  81. </View>
  82. <View className="bg-[#e7f2f8] h-[124px] mx-[5%] rounded-xl">
  83. <View className="h-9 w-9"></View>
  84. <View></View>
  85. </View>
  86. </ScrollView>
  87. </SafeAreaView>
  88. );
  89. };
  90. export default WalletPageComponent;