如何在按邮件周围显示弹出窗口? | Flyerchat |反应天然

发布于 2025-02-13 00:30:00 字数 1308 浏览 2 评论 0原文

I am using flyerhq https://github.com/flyerhq/react-native-chat- UI 用于聊天功能。

我想在按压消息周围显示弹出窗口。

以下是显示聊天消息并获得长期事件的代码。

 <FlyerHQChat
        onMessageLongPress={(messageInfo: MessageType.Any) => {
          setMessageDetails(messageInfo);
          setOpen(true);
        }}
    ....
  />

这是当前弹出案的代码

<TouchableOpacity ref={touchable}>
        
      </TouchableOpacity>
      <Popover
        from={touchable}
        isVisible={open}
        onRequestClose={() => setOpen(false)}
        arrowSize={{ height: 0, width: 0 }}>
       
                <Text>This is popover </Text>
       
      </Popover>


,屏幕顶部显示的弹出窗口

是Demo https://drive.google.com/file/d/1wazkkmevrbxewm9azvvav9c4wn8xuuuy9/view

当前popover

“

I am using flyerhq https://github.com/flyerhq/react-native-chat-ui for the chat function.

I want to display popover around the pressed message.

Below is the code to display chat messages and get a long-press event.

 <FlyerHQChat
        onMessageLongPress={(messageInfo: MessageType.Any) => {
          setMessageDetails(messageInfo);
          setOpen(true);
        }}
    ....
  />

Here is the code for popover

<TouchableOpacity ref={touchable}>
        
      </TouchableOpacity>
      <Popover
        from={touchable}
        isVisible={open}
        onRequestClose={() => setOpen(false)}
        arrowSize={{ height: 0, width: 0 }}>
       
                <Text>This is popover </Text>
       
      </Popover>


Currently, a popover displayed on top of the screen

Here is a link to the demo https://drive.google.com/file/d/1wAzKMevRBXeWM9AZVVAv9c4WN8xUUuy9/view

Image of the current Popover

Popover demo for chat

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文