fix: pass through rest props in ButtonLink

This commit is contained in:
2026-04-01 20:12:48 +02:00
parent 92ca1f6feb
commit 320035c828

View File

@@ -6,7 +6,7 @@ interface Props extends HTMLAttributes<"a"> {
external?: boolean | null | undefined;
}
const { class: className, external, href, target, title, rel } = Astro.props;
const { class: className, external, target, rel, ...rest } = Astro.props;
---
<a
@@ -14,9 +14,7 @@ const { class: className, external, href, target, title, rel } = Astro.props;
className,
"flex min-w-full items-center justify-center gap-4 rounded px-6 py-2 text-lg outline-offset-2 sm:px-24",
]}
{href}
{title}
target={target ?? (external ? "_blank" : undefined)}
rel={rel ?? (external ? "external me nofollow noreferrer" : undefined)}
><slot name="logo" /><slot /></a
{...rest}><slot name="logo" /><slot /></a
>