chore: fix non-portal popover positioning

This commit is contained in:
Aman Harwara
2023-08-09 13:34:44 +05:30
parent 970238ad4d
commit 48ee9ad16e
4 changed files with 3 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ const ListItemVaultInfo: FunctionComponent<Props> = ({ item }) => {
const sharedByContact = application.sharedVaults.getItemSharedBy(item)
return (
<div className="mt-2.5 flex flex-wrap items-center gap-2">
<div className="flex flex-wrap items-center gap-2">
<VaultNameBadge vault={vault} />
{sharedByContact && (

View File

@@ -223,7 +223,6 @@ const FilePreviewModal = observer(({ application }: Props) => {
align="start"
className="py-2"
overrideZIndex="z-modal"
portal={false}
>
<Menu a11yLabel="File context menu" isOpen={showOptionsMenu}>
<FileMenuOptions

View File

@@ -337,7 +337,6 @@ const NoteConflictResolutionModal = ({
className="!z-modal !max-w-[50ch]"
label={shouldSyncComparisonScroll ? 'Scrolling is synced' : 'Scrolling is not synced. Click to sync.'}
showOnMobile
portal={false}
>
<div className="relative rounded-full p-1 hover:bg-contrast">
<Icon type={shouldSyncComparisonScroll ? 'link' : 'link-off'} className="text-neutral" />
@@ -382,7 +381,6 @@ const NoteConflictResolutionModal = ({
}
showOnMobile
showOnHover={false}
portal={false}
>
<button className="rounded-full p-1 hover:bg-contrast">
<Icon type="info" className="text-neutral" />

View File

@@ -9,7 +9,7 @@ import MenuItem from '../Menu/MenuItem'
import Menu from '../Menu/Menu'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
const VaultMenu = ({ items }: { items: DecryptedItemInterface[] }) => {
const VaultMenu = observer(({ items }: { items: DecryptedItemInterface[] }) => {
const application = useApplication()
const vaults = application.vaults.getVaults()
@@ -104,7 +104,7 @@ const VaultMenu = ({ items }: { items: DecryptedItemInterface[] }) => {
})}
</Menu>
)
}
})
const AddToVaultMenuOption = ({ iconClassName, items }: { iconClassName: string; items: DecryptedItemInterface[] }) => {
const buttonRef = useRef<HTMLButtonElement>(null)