mirror of
https://github.com/alexohneander/alexohneander-astro.git
synced 2025-12-18 08:10:13 +00:00
feat: initial commit
This commit is contained in:
28
src/components/LinkButton.astro
Normal file
28
src/components/LinkButton.astro
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
export interface Props {
|
||||
href: string;
|
||||
className?: string;
|
||||
ariaLabel?: string;
|
||||
title?: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const { href, className, ariaLabel, title, disabled = false } = Astro.props;
|
||||
---
|
||||
|
||||
<a
|
||||
href={disabled ? "#" : href}
|
||||
tabindex={disabled ? "-1" : "0"}
|
||||
class={`group inline-block ${className}`}
|
||||
aria-label={ariaLabel}
|
||||
title={title}
|
||||
aria-disabled={disabled}
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
<style>
|
||||
a {
|
||||
@apply hover:text-skin-accent;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user