diff --git a/packages/react/src/components/Message/MessageToolbox.js b/packages/react/src/components/Message/MessageToolbox.js
index 8826bc026..0e45bb379 100644
--- a/packages/react/src/components/Message/MessageToolbox.js
+++ b/packages/react/src/components/Message/MessageToolbox.js
@@ -10,6 +10,7 @@ import { Modal } from '../Modal';
import { Icon } from '../Icon';
import { Button } from '../Button';
import { parseEmoji } from '../../lib/emoji';
+import { Tooltip } from '../Tooltip';
const MessageToolboxWrapperCss = css`
display: none;
@@ -88,30 +89,44 @@ export const MessageToolbox = ({
{...props}
>
{!isThreadMessage ? (
+
+
+
+ ) : null}
+ u._id === authenticatedUserId)
+ ? 'Remove star'
+ : 'Star'
+ }
+ position="top"
+ >
u._id === authenticatedUserId)
+ ? 'star-filled'
+ : 'star'
+ }`}
+ onClick={() => handleStarMessage(message)}
/>
- ) : null}
- u._id === authenticatedUserId)
- ? 'star-filled'
- : 'star'
- }`}
- onClick={() => handleStarMessage(message)}
- />
- setEmojiOpen(true)}
- />
+
+
+ setEmojiOpen(true)}
+ />
+
{!isThreadMessage && (
- handlePinMessage(message)}
- />
- )}
- {message.u._id === authenticatedUserId && (
- <>
- handleEditMessage(message)}
- />
+
handleClickDelete(message)}
+ icon={`${message.pinned ? 'pin-filled' : 'pin'}`}
+ onClick={() => handlePinMessage(message)}
/>
+
+ )}
+ {message.u._id === authenticatedUserId && (
+ <>
+
+ handleEditMessage(message)}
+ />
+
+
+ handleClickDelete(message)}
+ />
+
>
)}
- handlerReportMessage(message)}
- />
+
+ handlerReportMessage(message)}
+ />
+
{showDeleteModal && (
diff --git a/packages/react/src/components/Tooltip/Tooltip.js b/packages/react/src/components/Tooltip/Tooltip.js
index f014ae9dc..2e7612c2d 100644
--- a/packages/react/src/components/Tooltip/Tooltip.js
+++ b/packages/react/src/components/Tooltip/Tooltip.js
@@ -31,7 +31,7 @@ const Tooltip = ({ children, text, position }) => {
// Add more positions according to your needs and modify tooltipStyle and tooltipArrowStyle accordingly
if (position === 'top') {
- tooltipStyle.top = '-100%';
+ tooltipStyle.top = 'calc(-100% - 10px)'; // avoid overlaying the element
tooltipArrowStyle.top = '100%';
tooltipArrowStyle.transform = 'translateX(-50%)';
} else if (position === 'bottom') {