mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Add aria-label and title attributes
This commit is contained in:
@@ -2,12 +2,20 @@
|
|||||||
export interface Props {
|
export interface Props {
|
||||||
href: string;
|
href: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
ariaLabel?: string;
|
||||||
|
title?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { href, className } = Astro.props;
|
const { href, className, ariaLabel, title } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a type="button" href={href} class={`group ${className}`}>
|
<a
|
||||||
|
type="button"
|
||||||
|
href={href}
|
||||||
|
class={`group ${className}`}
|
||||||
|
aria-label={ariaLabel}
|
||||||
|
title={title}
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user