diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index ad1e9faba7bb..9f87f789b30f 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -262,6 +262,21 @@ ); } } + + &--container { + border-radius: 4px; + height: 24px; + // the z-index here is so that this container is above the message and when + // clicked on, doesn't propagate the click event to the message. + z-index: 2; + + @include light-theme { + background-color: $color-white; + } + @include dark-theme { + background-color: $color-gray-95; + } + } } .module-message__buttons__menu--incoming { diff --git a/ts/components/StopPropagation.tsx b/ts/components/StopPropagation.tsx index 9937de08240a..e2d29e372fd5 100644 --- a/ts/components/StopPropagation.tsx +++ b/ts/components/StopPropagation.tsx @@ -6,10 +6,14 @@ import React, { ReactNode } from 'react'; // Whenever you don't want click events to propagate into their parent container export const StopPropagation = ({ children, + className, }: { children: ReactNode; + className?: string; }): JSX.Element => ( // eslint-disable-next-line max-len // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events -
ev.stopPropagation()}>{children}
+
ev.stopPropagation()}> + {children} +
); diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 56c4d75939c6..a29533963f60 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -1407,22 +1407,24 @@ export class Message extends React.PureComponent { const maybePopperRef = !isWide ? popperRef : undefined; return ( - -
- + + +
+ + ); }}