From 5e8aa1cf0bdecfbeebe97fc04d3073e945d7ad2c Mon Sep 17 00:00:00 2001 From: James Acklin Date: Fri, 12 Mar 2021 21:29:39 -0500 Subject: [PATCH] chat: hover treatment for rows fixes urbit/landscape#460 --- .../views/apps/chat/components/ChatInput.tsx | 2 +- .../apps/chat/components/ChatMessage.tsx | 45 ++++++++++++++++--- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatInput.tsx b/pkg/interface/src/views/apps/chat/components/ChatInput.tsx index 720f2a77e4..8e9cfef294 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatInput.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatInput.tsx @@ -170,7 +170,7 @@ class ChatInput extends Component { className='cf' zIndex={0} > - + {avatar} { + return ( + + ); +}; + +const MessageWrapper = (props) => { + const { hovering, bind } = useHovering(); + return ( + + {props.children} + {/* {hovering ? : null} */} + + ); +}; + interface ChatMessageProps { msg: Post; previousMsg?: Post; @@ -195,7 +226,7 @@ class ChatMessage extends Component { { ) : null} {renderSigil ? ( - <> + - + ) : ( - + + + )} {isLastRead ? ( @@ -406,8 +439,8 @@ export const Message = ({