mirror of
https://github.com/alexohneander/alexohneander-astro.git
synced 2025-07-01 07:51:52 +00:00
31 lines
560 B
Plaintext
31 lines
560 B
Plaintext
---
|
|
export interface Props {
|
|
href: string;
|
|
className?: string;
|
|
ariaLabel?: string;
|
|
title?: string;
|
|
disabled?: boolean;
|
|
newTarget?: boolean;
|
|
}
|
|
|
|
const { href, className, ariaLabel, title, disabled = false, newTarget = true } = Astro.props;
|
|
---
|
|
|
|
<a
|
|
href={disabled ? "#" : href}
|
|
tabindex={disabled ? "-1" : "0"}
|
|
class={`group inline-block ${className}`}
|
|
aria-label={ariaLabel}
|
|
title={title}
|
|
aria-disabled={disabled}
|
|
target={ newTarget ? "_blank" : "_self"}
|
|
>
|
|
<slot />
|
|
</a>
|
|
|
|
<style>
|
|
a {
|
|
@apply hover:text-skin-accent;
|
|
}
|
|
</style>
|