budibase/packages/standard-components/src/Link.svelte

15 lines
256 B
Svelte
Raw Normal View History

2020-02-20 18:06:50 +01:00
<script>
import { link } from "@budibase/component-sdk"
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>
<a href={url} use:link {target}>
{text}
<slot />
</a>