Add DynLink

This commit is contained in:
Pieter Vander Vennet 2024-04-10 15:40:57 +02:00
parent c2819d5e5c
commit 6b37d59e88

View file

@ -0,0 +1,22 @@
<script lang="ts">
import { ImmutableStore, Store } from "../../Logic/UIEventSource"
export let text: Store<string>
export let href: Store<string>
export let classnames: Store<string> = undefined
export let download: Store<string> = undefined
export let ariaLabel: Store<string> = undefined
export let newTab: Store<boolean> = new ImmutableStore(false)
</script>
<a
href={$href}
aria-label={$ariaLabel}
title={$ariaLabel}
target={$newTab ? "_blank" : undefined}
download={$download}
class={$classnames}
>
{@html $text}
</a>