chore: fix table of contents option on mobile

This commit is contained in:
Aman Harwara
2023-10-18 17:05:16 +05:30
parent 12fcfa28a9
commit d39d5da17e
4 changed files with 15 additions and 10 deletions

View File

@@ -26,6 +26,7 @@ const PositionedPopoverContent = ({
togglePopover,
disableClickOutside,
disableMobileFullscreenTakeover,
disableFlip,
maxHeight,
portal = true,
offset,
@@ -53,7 +54,8 @@ const PositionedPopoverContent = ({
documentRect,
popoverRect: popoverRect ?? popoverElement?.getBoundingClientRect(),
side,
disableMobileFullscreenTakeover: disableMobileFullscreenTakeover,
disableMobileFullscreenTakeover,
disableFlip,
maxHeightFunction: maxHeight,
offset,
})
@@ -140,9 +142,9 @@ const PositionedPopoverContent = ({
>
<div
className={classNames(
'overflow-y-auto rounded border border-[--popover-border-color] bg-[--popover-background-color] [backdrop-filter:var(--popover-backdrop-filter)] shadow-main',
'overflow-y-auto rounded border border-[--popover-border-color] bg-[--popover-background-color] shadow-main [backdrop-filter:var(--popover-backdrop-filter)]',
!isDesktopScreen && !disableMobileFullscreenTakeover ? 'pb-safe-bottom pt-safe-top' : '',
'transition-[transform,opacity] motion-reduce:transition-opacity duration-75 [transform-origin:var(--transform-origin)]',
'transition-[transform,opacity] duration-75 [transform-origin:var(--transform-origin)] motion-reduce:transition-opacity',
styles ? 'scale-100 opacity-100' : 'scale-95 opacity-0',
className,
)}