Files
MyBlog-Next/src/components/LinkButton.astro
T

30 lines
479 B
Plaintext

---
export interface Props {
href: string;
className?: string;
ariaLabel?: string;
title?: string;
disabled?: boolean;
}
const { href, className, ariaLabel, title, disabled = false } = Astro.props;
---
<a
type="button"
href={disabled ? "#" : href}
tabindex={disabled ? "-1" : "0"}
class={`group ${className}`}
aria-label={ariaLabel}
title={title}
aria-disabled={disabled}
>
<slot />
</a>
<style>
a {
@apply hover:text-skin-accent;
}
</style>