-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing side prop for tooltip #988
Comments
It does have a
|
Hm, something seems wrong with my setup then, I get the following error when adding the side prop, also the tooltip doesn't seem to behave according to the setting: {#each tabs as tab}
<Tooltip.Root>
<Tooltip.Trigger asChild let:builder>
<a
href={tab.href}
class="flex h-9 w-9 items-center justify-center rounded-lg transition-colors {activeStyle(
tab.href,
$page.url
)} hover:text-foreground md:h-8 md:w-8"
use:builder.action
{...builder}
>
<svelte:component this={tab.icon} class="h-5 w-5" />
<span class="sr-only">{tab.title}</span>
</a>
</Tooltip.Trigger>
<Tooltip.Content side='right'>{tab.title}</Tooltip.Content>
</Tooltip.Root>
{/each} This is how the installed component looks like <script lang="ts">
import { Tooltip as TooltipPrimitive } from "bits-ui";
import { cn, flyAndScale } from "$lib/utils.js";
type $$Props = TooltipPrimitive.ContentProps;
let className: $$Props["class"] = undefined;
export let sideOffset: $$Props["sideOffset"] = 4;
export let transition: $$Props["transition"] = flyAndScale;
export let transitionConfig: $$Props["transitionConfig"] = {
y: 8,
duration: 150,
};
export { className as class };
</script>
<TooltipPrimitive.Content
{transition}
{transitionConfig}
{sideOffset}
class={cn(
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",
className
)}
{...$$restProps}
>
<slot />
</TooltipPrimitive.Content> |
Are you running the latest version of |
Indeed, updating |
Describe the feature
The original tooltip component has a
side
prop to define on which side ("left" | "right" | "bottom" | "top"
) the tooltip will be rendered.I'm happy to contribute, if you point me in the right direction, I assume this shouldn't be too complicated.
The text was updated successfully, but these errors were encountered: