Email.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import React from "react";
  2. import { StyleSheet } from "react-native";
  3. import {
  4. Modal,
  5. Card,
  6. Text,
  7. Button,
  8. Layout,
  9. Avatar,
  10. Icon,
  11. } from "@ui-kitten/components";
  12. import { useModel } from "flooks";
  13. export default function Email(props) {
  14. const { getWordsStr } = useModel("wordsModel");
  15. const { info, pressEvent } = props;
  16. const { id, avatar, name, sendTime, type, content } = info || {};
  17. return (
  18. <Card appearance='walletCard' onPress={pressEvent}>
  19. <Layout style={styles.main}>
  20. <Button size='tiny' style={styles.btn} status='primary' />
  21. {/* <Button size='tiny' style={styles.btn} status='info' /> */}
  22. <Avatar
  23. style={styles.avatar}
  24. shape='rounded'
  25. source={{
  26. uri: avatar,
  27. }}
  28. />
  29. <Layout style={styles.center}>
  30. <Layout style={styles.top}>
  31. <Text category='c1'>{name || "系统提醒"}</Text>
  32. <Text category='h1' style={styles.time}>
  33. {sendTime || "12月26日"}
  34. </Text>
  35. </Layout>
  36. <Text
  37. category='h1'
  38. status='info'
  39. numberOfLines={1}
  40. ellipsizeMode='tail'
  41. >
  42. {content ||
  43. "您的订单已经被取消收款方老司机的发链接SDK溜老司机的您的订单已经被取消收款方老司机的发链接SDK溜老司机的"}
  44. </Text>
  45. </Layout>
  46. </Layout>
  47. </Card>
  48. );
  49. }
  50. const styles = StyleSheet.create({
  51. main: {
  52. flexDirection: "row",
  53. alignItems: "center",
  54. backgroundColor: "transparent",
  55. },
  56. avatar: {
  57. width: 33,
  58. height: 33,
  59. backgroundColor: "#eee",
  60. },
  61. center: {
  62. flex: 1,
  63. marginLeft: 14,
  64. backgroundColor: "transparent",
  65. },
  66. top: {
  67. flexDirection: "row",
  68. alignItems: "center",
  69. backgroundColor: "transparent",
  70. justifyContent: "space-between",
  71. },
  72. time: {
  73. color: "#787878",
  74. },
  75. btn: {
  76. maxWidth: 10,
  77. width: 10,
  78. height: 10,
  79. borderRadius: 10,
  80. marginRight: 10,
  81. paddingHorizontal: 0,
  82. },
  83. });