blob: 6d434b1f67e4d86acfaf094fbafbd321ca676445 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
import { cn } from '@/lib/utils'
interface 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>
|