mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
ceb406314b
Replace decorative usage of Hr component with borders to improve semantic. - remove Hr component - replace decorative hr elements with borders - introduce app-layout utility class - update layout and spacing - update docs about border css custom property
46 lines
691 B
Plaintext
46 lines
691 B
Plaintext
---
|
|
export interface Props {
|
|
id?: string;
|
|
href: string;
|
|
class?: string;
|
|
ariaLabel?: string;
|
|
title?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
const {
|
|
id,
|
|
href,
|
|
class: className = "",
|
|
ariaLabel,
|
|
title,
|
|
disabled = false,
|
|
} = Astro.props;
|
|
---
|
|
|
|
{
|
|
disabled ? (
|
|
<span
|
|
id={id}
|
|
class:list={["group inline-flex items-center gap-1", className]}
|
|
title={title}
|
|
aria-disabled={disabled}
|
|
>
|
|
<slot />
|
|
</span>
|
|
) : (
|
|
<a
|
|
id={id}
|
|
{href}
|
|
class:list={[
|
|
"group inline-flex items-center gap-1 hover:text-accent",
|
|
className,
|
|
]}
|
|
aria-label={ariaLabel}
|
|
title={title}
|
|
>
|
|
<slot />
|
|
</a>
|
|
)
|
|
}
|