Files
salam e687b4437b
linter / quality (push) Canceled after 0s
tests / ci (8.3) (push) Canceled after 0s
tests / ci (8.4) (push) Canceled after 0s
tests / ci (8.5) (push) Canceled after 0s
first commit
2026-10-06 18:53:03 +02:00

27 lines
624 B
Svelte

<script lang="ts">
import type { Snippet } from 'svelte';
import { cn } from '@/lib/utils';
let {
children,
asChild = false,
class: className = '',
...rest
}: {
children?: Snippet<[Record<string, unknown>]>;
asChild?: boolean;
class?: string;
[key: string]: unknown;
} = $props();
const classes = () => cn('transition-colors hover:text-foreground', className);
</script>
{#if asChild}
{@render children?.({ class: classes(), ...rest })}
{:else}
<a class={classes()} {...rest}>
{@render children?.({})}
</a>
{/if}