diff --git a/packages/web/src/javascripts/Components/FilePreview/FilePreviewModal.tsx b/packages/web/src/javascripts/Components/FilePreview/FilePreviewModal.tsx index 40d0f6644..63d5d3469 100644 --- a/packages/web/src/javascripts/Components/FilePreview/FilePreviewModal.tsx +++ b/packages/web/src/javascripts/Components/FilePreview/FilePreviewModal.tsx @@ -10,6 +10,9 @@ import { ViewControllerManager } from '@/Controllers/ViewControllerManager' import { observer } from 'mobx-react-lite' import FilePreview from './FilePreview' import { getIconForFileType } from '@/Utils/Items/Icons/getIconForFileType' +import FileMenuOptions from '../FileContextMenu/FileMenuOptions' +import Menu from '../Menu/Menu' +import Popover from '../Popover/Popover' type Props = { application: WebApplication @@ -23,7 +26,9 @@ const FilePreviewModal: FunctionComponent = observer(({ application, view return null } + const [showOptionsMenu, setShowOptionsMenu] = useState(false) const [showFileInfoPanel, setShowFileInfoPanel] = useState(false) + const menuButtonRef = useRef(null) const closeButtonRef = useRef(null) const keyDownHandler: KeyboardEventHandler = useCallback( @@ -91,6 +96,38 @@ const FilePreviewModal: FunctionComponent = observer(({ application, view {currentFile.name}
+ + { + setShowOptionsMenu(false) + }} + side="bottom" + align="start" + className="py-2" + overrideZIndex="z-modal" + > + + { + setShowOptionsMenu(false) + }} + shouldShowRenameOption={false} + shouldShowAttachOption={false} + /> + +