otherInformationBox.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. import { View, Text, StyleProp, ViewStyle } from 'react-native';
  2. import React from 'react';
  3. import { convertToHKTime } from '../../util/lib';
  4. //this is a reuseable component "其他資訊" 灰色格仔 on Charging Page
  5. interface OtherInformationBoxProps {
  6. extendedStyle?: StyleProp<ViewStyle>;
  7. actual_start_time?: any;
  8. }
  9. const OtherInformationBox: React.FC<OtherInformationBoxProps> = ({ extendedStyle, actual_start_time }) => {
  10. const formattedActualStartTime = convertToHKTime(actual_start_time).hkTime;
  11. return (
  12. <View className="border-slate-300 rounded-2xl justify-center pl-4" style={[{ borderWidth: 1 }, extendedStyle]}>
  13. <Text className="text-lg pb-2">其他資訊</Text>
  14. <View className="flex-row">
  15. <View className="flex-1 flex-column">
  16. <Text className="text-base color-[#888888]">開始時間</Text>
  17. <Text className="text-base">{formattedActualStartTime}</Text>
  18. </View>
  19. <View className="flex-1 flex-column">
  20. <Text className="text-base color-[#888888]">充電座</Text>
  21. <Text className="text-base">A104</Text>
  22. </View>
  23. </View>
  24. </View>
  25. );
  26. };
  27. export default OtherInformationBox;