diff --git a/web/components/message-result.css b/web/components/message-result.css --- a/web/components/message-result.css +++ b/web/components/message-result.css @@ -1,11 +1,14 @@ .messageContainer { - overflow-y: scroll; border: 1px solid var(--pin-message-modal-border-color); border-radius: 7px; - max-height: 400px; margin: 0 32px 16px 32px; } +.messageContainerOverflow { + overflow-y: scroll; + max-height: 400px; +} + .messageDate { color: var(--chat-timestamp-color); font-size: var(--xs-font-12); diff --git a/web/components/message-result.react.js b/web/components/message-result.react.js --- a/web/components/message-result.react.js +++ b/web/components/message-result.react.js @@ -1,5 +1,6 @@ // @flow +import classNames from 'classnames'; import * as React from 'react'; import { useStringForUser } from 'lib/hooks/ens-cache.js'; @@ -15,10 +16,11 @@ type MessageResultProps = { +item: ChatMessageInfoItem, +threadInfo: ThreadInfo, + +scrollable: boolean, }; function MessageResult(props: MessageResultProps): React.Node { - const { item, threadInfo } = props; + const { item, threadInfo, scrollable } = props; const getTextMessageMarkdownRules = useTextMessageRulesFunc(threadInfo); const messageListContext = React.useMemo(() => { @@ -33,8 +35,13 @@ shouldShowUsername ? item.messageInfo.creator : null, ); + const messageContainerClassNames = classNames({ + [css.messageContainer]: true, + [css.messageContainerOverflow]: scrollable, + }); + return ( -
+
{username}
diff --git a/web/modals/chat/message-results-modal.react.js b/web/modals/chat/message-results-modal.react.js --- a/web/modals/chat/message-results-modal.react.js +++ b/web/modals/chat/message-results-modal.react.js @@ -122,6 +122,7 @@ key={item.messageInfo.id} item={item} threadInfo={threadInfo} + scrollable={false} /> )); return <>{items}; diff --git a/web/modals/chat/toggle-pin-modal.react.js b/web/modals/chat/toggle-pin-modal.react.js --- a/web/modals/chat/toggle-pin-modal.react.js +++ b/web/modals/chat/toggle-pin-modal.react.js @@ -102,7 +102,11 @@ return (
{modalInfo.confirmationText}
- +