Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix(web): position tooltip arrows outside content

boojack773e56e53765
diff --git a/web/src/components/ui/tooltip.tsx b/web/src/components/ui/tooltip.tsx
index 246768f91..177cad1d9 100644
--- a/web/src/components/ui/tooltip.tsx
+++ b/web/src/components/ui/tooltip.tsx
@@ -44,7 +44,12 @@ const TooltipContent = React.forwardRef<
{...props}
>
{children}
- <TooltipPrimitive.Arrow className="bg-primary z-tooltip size-2.5 rotate-45 rounded-[2px]" />
+ <TooltipPrimitive.Arrow
+ className={cn(
+ "pointer-events-none bg-primary z-tooltip size-2.5 rotate-45 rounded-[2px]",
+ "data-[side=top]:bottom-[-5px] data-[side=bottom]:top-[-5px] data-[side=left]:right-[-5px] data-[side=right]:left-[-5px]",
+ )}
+ />
</TooltipPrimitive.Popup>
</TooltipPrimitive.Positioner>
</TooltipPrimitive.Portal>