Skip to content

Commit d7d4887

Browse files
committed
Adjust styling to match design guide better
1 parent 100cc2b commit d7d4887

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/ui/tooltip.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const TooltipTrigger = ({ ...props }: React.ComponentProps<typeof TooltipPrimiti
1616

1717
const TooltipContent = ({
1818
className,
19-
sideOffset = 0,
19+
sideOffset = 8,
2020
children,
2121
...props
2222
}: React.ComponentProps<typeof TooltipPrimitive.Content>) => {
@@ -26,13 +26,12 @@ const TooltipContent = ({
2626
data-slot="tooltip-content"
2727
sideOffset={sideOffset}
2828
className={cn(
29-
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
29+
'border bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance shadow-[0px_4px_6px_-1px_rgba(0,0,0,0.10),0px_2px_4px_-1px_rgba(0,0,0,0.06)]',
3030
className
3131
)}
3232
{...props}
3333
>
3434
{children}
35-
<TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
3635
</TooltipPrimitive.Content>
3736
</TooltipPrimitive.Portal>
3837
)

0 commit comments

Comments
 (0)