mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
4c1b9c89f3
Fix Subtype missing error on 'a' element.
29 lines
476 B
Plaintext
29 lines
476 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
|
|
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>
|