Merge branch 'INDA-330-pii-update' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / FolderTree / FloatingEllipsis.tsx
blobdb95e6677b4e8504fff834ece41e84155ebdb644
1 import React, { useEffect, useRef } from 'react';
3 import { useFloatingEllipsisEventBasedUpdater } from './hooks';
5 const FloatingEllipsis = ({ visibilityControlRef }: { visibilityControlRef: React.RefObject<HTMLDivElement> }) => {
6     const elem = useRef<HTMLDivElement>(null);
8     const updateVisibility = useFloatingEllipsisEventBasedUpdater({
9         visibilityControlRef,
10         elem,
11     });
12     useEffect(() => {
13         updateVisibility();
14     }, []);
16     return <div className="floating-ellipsis floating-ellipsis-hidden" ref={elem}></div>;
19 export default FloatingEllipsis;