mirror of
https://github.com/alexohneander/alexohneander-astro.git
synced 2025-06-30 23:41:52 +00:00
feat: add target blank as default to LinkButton
This commit is contained in:
parent
261a6f548b
commit
31a309b95c
@ -81,6 +81,7 @@ const { activeNav } = Astro.props;
|
||||
}`}
|
||||
ariaLabel="search"
|
||||
title="Search"
|
||||
newTarget={false}
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user