27 lines
536 B
Text
27 lines
536 B
Text
---
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type Props = {
|
|
href: string;
|
|
external?: boolean;
|
|
class?: string;
|
|
underline?: boolean;
|
|
[key: string]: any;
|
|
};
|
|
|
|
const { href, external, class: className, underline, ...rest } = Astro.props;
|
|
---
|
|
|
|
<a
|
|
href={href}
|
|
target={external ? '_blank' : '_self'}
|
|
class={cn(
|
|
'inline-block transition-colors duration-300 ease-in-out',
|
|
underline &&
|
|
'underline decoration-muted-foreground underline-offset-[3px] hover:decoration-foreground',
|
|
className,
|
|
)}
|
|
{...rest}
|
|
>
|
|
<slot />
|
|
</a>
|