refactor: menu items (#2057)

This commit is contained in:
Aman Harwara
2022-11-27 22:53:30 +05:30
committed by GitHub
parent 8145cdb8ac
commit 3c91b0cb17
24 changed files with 291 additions and 352 deletions

View File

@@ -8,6 +8,7 @@ import { HistoryModalController } from '@/Controllers/NoteHistory/HistoryModalCo
import Popover from '../Popover/Popover'
import { LinkingController } from '@/Controllers/LinkingController'
import RoundIconButton from '../Button/RoundIconButton'
import Menu from '../Menu/Menu'
type Props = {
application: WebApplication
@@ -50,17 +51,19 @@ const NotesOptionsPanel = ({
togglePopover={toggleMenu}
anchorElement={buttonRef.current}
open={isOpen}
className="select-none"
className="select-none md:pt-2"
>
<NotesOptions
application={application}
navigationController={navigationController}
notesController={notesController}
linkingController={linkingController}
historyModalController={historyModalController}
requestDisableClickOutside={handleDisableClickOutsideRequest}
closeMenu={toggleMenu}
/>
<Menu a11yLabel="Note options menu" isOpen={isOpen}>
<NotesOptions
application={application}
navigationController={navigationController}
notesController={notesController}
linkingController={linkingController}
historyModalController={historyModalController}
requestDisableClickOutside={handleDisableClickOutsideRequest}
closeMenu={toggleMenu}
/>
</Menu>
</Popover>
</>
)