You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

2 years ago
  1. import '~/styles/layout.scss'
  2. import { Button, Divider, Popup } from "react-vant"
  3. interface NotifyProps {
  4. visible: boolean,
  5. setVisible: Function
  6. }
  7. const Notify = (props: NotifyProps) => {
  8. const { visible, setVisible } = props
  9. const data = [
  10. { title: '提醒', color: '#F96900', imgName: 'warn', desc: '您挂单的“生肖唐彩-狗”NFT, @Miner 出价 4,153.00 USDT' },
  11. { title: '注册成功', color: '#11C0CB', imgName: 'register-success', desc: '恭喜,您已成功注册,9527NFT数字交易平台.' },
  12. ]
  13. return (
  14. <Popup
  15. visible={visible}
  16. onClose={() => setVisible(false)}
  17. position='right'
  18. style={{
  19. height: '100%',
  20. width: '70%',
  21. borderTopLeftRadius: 20,
  22. borderBottomLeftRadius: 20,
  23. boxShadow: '8px 8px 20px 0px rgba(0, 0, 0, 0.1)'
  24. }}
  25. overlayStyle={{ backgroundColor: 'rgba(0,0,0,0.05)' }}
  26. >
  27. <div className="p-2">
  28. <div className="fz-wb-550"></div>
  29. <Divider className="" style={{ borderColor: '#EEE' }} />
  30. <div>
  31. {
  32. data.map((item, index) => (
  33. <div className="notify-box row-items mt-2" key={index}>
  34. <img src={require(`~/assets/${item.imgName}.png`)} className="img" alt="" />
  35. <div className='ml-2'>
  36. <div className='fz-14 fz-wb-550' style={{ color: item.color }}>{item.title}</div>
  37. <div className='fz-12 sub-text mt-4px'>{item.desc}</div>
  38. </div>
  39. </div>
  40. ))
  41. }
  42. </div>
  43. <div className='mt-5 row-center'>
  44. <Button
  45. round
  46. size="small"
  47. className='fz-wb-550'
  48. color='#EEEEEE'
  49. >
  50. <div className='black'></div>
  51. </Button>
  52. </div>
  53. <div className='close'>
  54. <i className='iconfont icon-right-double-arrow fz-22 sub-text' onClick={() => setVisible(false)}></i>
  55. </div>
  56. </div>
  57. </Popup>
  58. )
  59. }
  60. export default Notify