StepStart.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * 新充电流程:充电前的模块
  3. * @邠心vbe on 2023/06/20
  4. */
  5. import React from 'react';
  6. import { View, StyleSheet, ScrollView } from 'react-native';
  7. import Button from '../../components/Button';
  8. import TextView from '../../components/TextView';
  9. import StatusImage from './StatusImage';
  10. import ConnectorInfo from './ConnectorInfo';
  11. export default StepStart = ({
  12. connectorInfo={},
  13. currentPayment,
  14. onPaymentMethodChanged,
  15. onAuthenticate
  16. }) => {
  17. return (
  18. <View style={ui.flex1}>
  19. <ScrollView
  20. style={ui.flex1}
  21. contentContainerStyle={$padding(16)}>
  22. <View style={ui.center}>
  23. <StatusImage
  24. isAuthentic={false}/>
  25. <TextView style={styles.stepTitle}>{$t('charging.stepInsertConnector')}</TextView>
  26. <TextView style={styles.stepDesc}>{$t('charging.stepInsertConnectorDesc')}</TextView>
  27. </View>
  28. <ConnectorInfo connectorInfo={connectorInfo}/>
  29. <View style={{height: 56}}></View>
  30. </ScrollView>
  31. <Button
  32. style={styles.buttonView}
  33. text={$t('charging.btnAuthenticate')}
  34. elevation={1.5}
  35. borderRadius={6}
  36. onClick={onAuthenticate}/>
  37. </View>
  38. );
  39. }
  40. const styles = StyleSheet.create({
  41. stepImage: {
  42. width: $vw(70),
  43. height: $vw(16),
  44. margin: 16
  45. },
  46. stepTitle: {
  47. fontSize: 24,
  48. fontWeight: 'bold',
  49. color: colorAccent
  50. },
  51. stepDesc: {
  52. color: textPrimary,
  53. fontSize: 16,
  54. textAlign: 'center',
  55. ...$padding(0, 32, 32)
  56. },
  57. buttonView: {
  58. left: 16,
  59. right: 16,
  60. bottom: 24,
  61. position: 'absolute'
  62. }
  63. })