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

@@ -10,12 +10,14 @@ import {
import { useRef, useState } from 'preact/hooks';
import { observer } from 'mobx-react-lite';
import { NotesOptions } from './NotesOptions';
import { WebApplication } from '@/ui_models/application';
type Props = {
application: WebApplication;
appState: AppState;
};
export const NotesOptionsPanel = observer(({ appState }: Props) => {
export const NotesOptionsPanel = observer(({ application, appState }: Props) => {
const [open, setOpen] = useState(false);
const [position, setPosition] = useState({
top: 0,
@@ -76,6 +78,7 @@ export const NotesOptionsPanel = observer(({ appState }: Props) => {
>
{open && (
<NotesOptions
application={application}
appState={appState}
closeOnBlur={closeOnBlur}
onSubmenuChange={onSubmenuChange}