refactor: mobile popover UX (#2140)

This commit is contained in:
Aman Harwara
2023-01-18 01:00:23 +05:30
committed by GitHub
parent 7af4ecbc3d
commit baf77516fe
33 changed files with 237 additions and 117 deletions

View File

@@ -22,6 +22,7 @@ const FileContextMenu: FunctionComponent<Props> = observer(
return (
<Popover
title="File options"
open={showFileContextMenu}
anchorPoint={fileContextMenuLocation}
togglePopover={() => setShowFileContextMenu(!showFileContextMenu)}

View File

@@ -30,7 +30,13 @@ const FilesOptionsPanel = ({
return (
<>
<RoundIconButton label="File options menu" onClick={toggleMenu} ref={buttonRef} icon="more" />
<Popover togglePopover={toggleMenu} anchorElement={buttonRef.current} open={isOpen} className="py-2">
<Popover
title="File options"
togglePopover={toggleMenu}
anchorElement={buttonRef.current}
open={isOpen}
className="py-2"
>
<Menu a11yLabel="File options panel" isOpen={isOpen}>
<FileMenuOptions
filesController={filesController}