From 6e720aa0d5936bdb260f3b0669165ff8048dd49f Mon Sep 17 00:00:00 2001 From: SHYAKA Davis <87414827+shyakadavis@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:10:38 +0200 Subject: [PATCH] patch: animate tooltips (#1417) Co-authored-by: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> --- .../src/lib/registry/default/ui/tooltip/tooltip-content.svelte | 2 +- .../src/lib/registry/new-york/ui/tooltip/tooltip-content.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/docs/src/lib/registry/default/ui/tooltip/tooltip-content.svelte b/sites/docs/src/lib/registry/default/ui/tooltip/tooltip-content.svelte index 03058002b..68ff232ba 100644 --- a/sites/docs/src/lib/registry/default/ui/tooltip/tooltip-content.svelte +++ b/sites/docs/src/lib/registry/default/ui/tooltip/tooltip-content.svelte @@ -14,7 +14,7 @@ bind:ref {sideOffset} class={cn( - "bg-popover text-popover-foreground z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", + "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 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", className )} {...restProps} diff --git a/sites/docs/src/lib/registry/new-york/ui/tooltip/tooltip-content.svelte b/sites/docs/src/lib/registry/new-york/ui/tooltip/tooltip-content.svelte index 313a8697f..dc7251cee 100644 --- a/sites/docs/src/lib/registry/new-york/ui/tooltip/tooltip-content.svelte +++ b/sites/docs/src/lib/registry/new-york/ui/tooltip/tooltip-content.svelte @@ -14,7 +14,7 @@ bind:ref {sideOffset} class={cn( - "bg-primary text-primary-foreground z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs", + "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 overflow-hidden rounded-md px-3 py-1.5 text-xs", className )} {...restProps}