mirror of
https://github.com/alexohneander/alexohneander-astro.git
synced 2025-12-16 20:20:11 +00:00
38 lines
572 B
Plaintext
38 lines
572 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>
|