feat: toggle move to trash to delete permanently on alt key down

This commit is contained in:
Antonella Sgarlatta
2021-07-28 16:18:05 -03:00
parent eb6d8c9cba
commit 44bf907aa4
7 changed files with 74 additions and 43 deletions

View File

@@ -3,12 +3,14 @@ import { toDirective, useCloseOnBlur, useCloseOnClickOutside } from './utils';
import { observer } from 'mobx-react-lite';
import { NotesOptions } from './NotesOptions';
import { useCallback, useEffect, useRef } from 'preact/hooks';
import { WebApplication } from '@/ui_models/application';
type Props = {
application: WebApplication;
appState: AppState;
};
const NotesContextMenu = observer(({ appState }: Props) => {
const NotesContextMenu = observer(({ application, appState }: Props) => {
const {
contextMenuOpen,
contextMenuPosition,
@@ -46,7 +48,11 @@ const NotesContextMenu = observer(({ appState }: Props) => {
maxHeight: contextMenuMaxHeight,
}}
>
<NotesOptions appState={appState} closeOnBlur={closeOnBlur} />
<NotesOptions
application={application}
appState={appState}
closeOnBlur={closeOnBlur}
/>
</div>
) : null;
});