2020-02-20 18:06:50 +01:00
|
|
|
<script>
|
2020-11-18 20:18:18 +01:00
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
2020-11-20 10:50:10 +01:00
|
|
|
const { linkable, styleable } = getContext("sdk")
|
|
|
|
const styles = getContext("style")
|
2020-11-13 16:42:32 +01:00
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
export let url = ""
|
|
|
|
export let text = ""
|
|
|
|
export let openInNewTab = false
|
|
|
|
|
|
|
|
$: target = openInNewTab ? "_blank" : "_self"
|
2020-02-20 18:06:50 +01:00
|
|
|
</script>
|
|
|
|
|
2020-11-17 13:20:40 +01:00
|
|
|
<a href={url} use:linkable {target} use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
{text}
|
|
|
|
<slot />
|
|
|
|
</a>
|