feat: add files button to multiple selection view (#1067)

This commit is contained in:
Aman Harwara
2022-06-06 23:50:11 +05:30
committed by GitHub
parent 59dcca18d6
commit 218e7a3d06
14 changed files with 222 additions and 96 deletions

View File

@@ -1,4 +1,3 @@
import { ViewControllerManager } from '@/Services/ViewControllerManager'
import Icon from '@/Components/Icon/Icon'
import VisuallyHidden from '@reach/visually-hidden'
import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
@@ -8,14 +7,25 @@ import { observer } from 'mobx-react-lite'
import NotesOptions from './NotesOptions'
import { WebApplication } from '@/Application/Application'
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import { NotesController } from '@/Controllers/NotesController'
import { NavigationController } from '@/Controllers/Navigation/NavigationController'
import { NoteTagsController } from '@/Controllers/NoteTagsController'
type Props = {
application: WebApplication
viewControllerManager: ViewControllerManager
navigationController: NavigationController
notesController: NotesController
noteTagsController: NoteTagsController
onClickPreprocessing?: () => Promise<void>
}
const NotesOptionsPanel = ({ application, viewControllerManager, onClickPreprocessing }: Props) => {
const NotesOptionsPanel = ({
application,
navigationController,
notesController,
noteTagsController,
onClickPreprocessing,
}: Props) => {
const [open, setOpen] = useState(false)
const [position, setPosition] = useState({
top: 0,
@@ -82,7 +92,9 @@ const NotesOptionsPanel = ({ application, viewControllerManager, onClickPreproce
{open && (
<NotesOptions
application={application}
viewControllerManager={viewControllerManager}
navigationController={navigationController}
notesController={notesController}
noteTagsController={noteTagsController}
closeOnBlur={closeOnBlur}
/>
)}