Zerotask/rust-jungle

View on GitHub
src/components/internalLink.svelte

Summary

Maintainability
Test Coverage
<script lang="ts">
    export let href: string;
    let title = `Go to: ${href}`;
</script>

{#if href}
    <a {href} {title} aria-label={title} sveltekit:prefetch>
        <slot>{href}</slot>
    </a>
{:else}
    <span class="error">ERROR: invalid url</span>
{/if}

<style lang="postcss">
    a {
        margin-right: 8px;
    }
</style>