Web: Files: fixed drag tooltip

This commit is contained in:
Nikita Gopienko 2023-11-15 16:27:12 +03:00
parent 15d9f6c7ef
commit 85d9f31b99

View File

@ -6,6 +6,7 @@ import { Base } from "@docspace/components/themes";
const StyledTooltip = styled.div`
position: fixed;
display: none;
padding: 8px;
z-index: 250;
background: ${(props) => props.theme.filesDragTooltip.background};
@ -62,6 +63,8 @@ const DragTooltip = (props) => {
const setTooltipPosition = useCallback(() => {
const tooltip = tooltipRef.current;
if (tooltip) {
tooltip.style.display = "block";
const margin = 8;
tooltip.style.left =
(isRtl ? tooltipPageX - tooltip.offsetWidth : tooltipPageX + margin) +