Files
MyBlog-Next/src/components/LinkButton.astro
T
Sat Naing ceb406314b refactor: improve semantic by replacing decorative hr with borders (#597)
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
2026-01-04 20:24:34 +07:00

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>
)
}