mirror of
https://github.com/alexohneander/alexohneander-astro.git
synced 2025-12-18 08:10:13 +00:00
feat: add target blank as default to LinkButton
This commit is contained in:
@@ -5,9 +5,10 @@ export interface Props {
|
||||
ariaLabel?: string;
|
||||
title?: string;
|
||||
disabled?: boolean;
|
||||
newTarget?: boolean;
|
||||
}
|
||||
|
||||
const { href, className, ariaLabel, title, disabled = false } = Astro.props;
|
||||
const { href, className, ariaLabel, title, disabled = false, newTarget = true } = Astro.props;
|
||||
---
|
||||
|
||||
<a
|
||||
@@ -17,6 +18,7 @@ const { href, className, ariaLabel, title, disabled = false } = Astro.props;
|
||||
aria-label={ariaLabel}
|
||||
title={title}
|
||||
aria-disabled={disabled}
|
||||
target={ newTarget ? "_blank" : "_self"}
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user