2024-04-10 15:40:57 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { ImmutableStore, Store } from "../../Logic/UIEventSource"
|
2024-08-09 16:24:38 +02:00
|
|
|
import Icon from "../Map/Icon.svelte"
|
2024-04-10 15:40:57 +02:00
|
|
|
|
|
|
|
|
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)
|
2024-08-09 16:24:38 +02:00
|
|
|
export let icon: Store<string> = undefined
|
2024-04-10 15:40:57 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<a
|
|
|
|
|
href={$href}
|
|
|
|
|
aria-label={$ariaLabel}
|
|
|
|
|
title={$ariaLabel}
|
|
|
|
|
target={$newTab ? "_blank" : undefined}
|
|
|
|
|
download={$download}
|
|
|
|
|
class={$classnames}
|
|
|
|
|
>
|
2024-08-09 16:24:38 +02:00
|
|
|
{#if $icon}
|
2024-08-10 12:09:55 +02:00
|
|
|
<Icon clss="w-4 h-4" icon={$icon}/>
|
2024-08-09 16:24:38 +02:00
|
|
|
{/if}
|
2024-04-10 15:40:57 +02:00
|
|
|
{@html $text}
|
|
|
|
|
</a>
|