Skip to content

Commit

Permalink
fix: fix popup position on mobile (esp sharing page)
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed Sep 19, 2023
1 parent 2e176e0 commit 3b39746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/userscript/src/ui/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ function MenuInner({ container }: { container: HTMLDivElement }) {
>
<HoverCard.Content
className={isMobile
? 'fixed grid grid-cols-2 gap-x-1 px-1.5 pt-2 rounded bg-gray-900 shadow-md transition-opacity duration-200 animate-slideUp'
? 'grid grid-cols-2 gap-x-1 px-1.5 pt-2 rounded bg-gray-900 shadow-md transition-opacity duration-200 animate-slideUp'
: 'grid grid-cols-2 gap-x-1 px-1.5 py-2 pb-0 rounded-md bg-gray-900 shadow-md transition-opacity duration-200 animate-fadeIn'}
style={{
width: isMobile ? 316 : 268,
left: -6,
bottom: 0,
}}
sideOffset={8}
sideOffset={isMobile ? 0 : 8}
side={isMobile ? 'bottom' : 'right'}
align="start"
alignOffset={isMobile ? 0 : -64}
Expand Down

0 comments on commit 3b39746

Please sign in to comment.