Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Tool Tips positioned above for Message Toolbox #901

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/react/src/views/Message/MessageToolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@ export const MessageToolbox = ({
style={styleOverrides}
{...props}
>
{surfaceOptions?.length > 0 && (
<SurfaceMenu options={surfaceOptions} size="small" />
)}
{menuOptions?.length > 0 && (
<Menu
size="small"
Expand All @@ -241,6 +238,15 @@ export const MessageToolbox = ({
style={{ top: 'auto', bottom: `calc(100% + 2px)` }}
/>
)}
{surfaceOptions?.length > 0 && (
<SurfaceMenu
options={surfaceOptions.map(option => ({
...option,
tooltipPosition: 'top'
}))}
size="small"
/>
)}

{isEmojiOpen && (
<EmojiPicker
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/views/SurfaceMenu/SurfaceItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Tooltip, ActionButton } from '@embeddedchat/ui-elements';

const SurfaceItem = ({ item, size }) => (
<Tooltip text={item.label} position="bottom" key={item.id}>
<Tooltip text={item.label} position={item.tooltipPosition || 'bottom'} key={item.id}>
<ActionButton
square
ghost
Expand Down