2020-02-20 18:06:50 +01:00
|
|
|
<script>
|
2020-02-25 16:21:23 +01:00
|
|
|
export let url = ""
|
|
|
|
export let text = ""
|
|
|
|
export let openInNewTab = false
|
|
|
|
|
|
|
|
export let _bb
|
|
|
|
|
|
|
|
let anchorElement
|
|
|
|
|
|
|
|
$: anchorElement && !text && _bb.attachChildren(anchorElement)
|
|
|
|
$: target = openInNewTab ? "_blank" : "_self"
|
2020-02-20 18:06:50 +01:00
|
|
|
</script>
|
|
|
|
|
2020-06-03 23:52:33 +02:00
|
|
|
<a href={url} bind:this={anchorElement} {target}>{text}</a>
|
2020-02-21 12:43:21 +01:00
|
|
|
|
|
|
|
<style>
|
2020-02-25 16:21:23 +01:00
|
|
|
.textDecoration {
|
|
|
|
text-decoration: var(--textDecoration);
|
|
|
|
}
|
2020-02-21 12:43:21 +01:00
|
|
|
</style>
|