feat: init
This commit is contained in:
commit
610fa90bec
147 files changed
+4979
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<script lang="ts">
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import TooltipPortal from './tooltip-portal.svelte';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import type { WithoutChildrenOrChild } from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
sideOffset = 6,
|
||||
side = 'top',
|
||||
children,
|
||||
portalProps,
|
||||
...restProps
|
||||
}: TooltipPrimitive.ContentProps & {
|
||||
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof TooltipPortal>>;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<TooltipPortal {...portalProps}>
|
||||
<TooltipPrimitive.Content
|
||||
bind:ref
|
||||
data-slot="tooltip-content"
|
||||
{sideOffset}
|
||||
{side}
|
||||
class={cn(
|
||||
'cladd-surface cladd-gradient cladd-outline cladd-level-5 cladd-anim-tooltip z-50 w-fit max-w-72 origin-(--bits-tooltip-content-transform-origin) rounded-cladd-tooltip px-2 py-1 text-cladd-xs leading-normal font-medium text-balance text-cladd-fg',
|
||||
className
|
||||
)}
|
||||
{...restProps}
|
||||
>
|
||||
{@render children?.()}
|
||||
</TooltipPrimitive.Content>
|
||||
</TooltipPortal>
|
||||
Reference in new issue
Block a user