BankCom.tsx 844 B

12345678910111213141516171819202122232425262728293031
  1. import * as React from 'react';
  2. import { Div, Button, Image, Text, Avatar, Icon } from 'react-native-magnus';
  3. export default function BankCom({
  4. info,
  5. checked = false,
  6. onPress,
  7. next = false,
  8. }) {
  9. const { bankName, cardNo } = info;
  10. return (
  11. <Button p={12} bg="white" mt={5} block rounded="none" onPress={onPress}>
  12. <Div flex={1} row>
  13. <Icon
  14. w={33}
  15. h={33}
  16. name="creditcard"
  17. bg="yellow500"
  18. color="white"
  19. rounded="circle"
  20. />
  21. <Div flex={1} ml={5}>
  22. <Text fontSize="sm">{bankName}</Text>
  23. <Text fontSize="xs">{cardNo}</Text>
  24. </Div>
  25. {checked && <Icon name="checkcircle" color="yellow500" />}
  26. {next && <Icon name="right" color="gray500" />}
  27. </Div>
  28. </Button>
  29. );
  30. }