wf4/app/components/RichText/Link.vue
webfussel 9ecafeba02 FIX: mobile layout for easy skills
Better layout for easily explained skills
2025-02-21 20:34:08 +01:00

18 lines
506 B
Vue

<template>
<a v-if="isExternal" :href="href" :target="target" class="text inline-flex-row">
{{ content }}
<Icon name="ph:arrow-square-out-duotone" mode="svg" />
</a>
<NuxtLink v-else :to="href" class="text inline-flex-row">
{{ content }}
<Icon name="ph:link-simple-duotone" mode="svg" />
</NuxtLink>
</template>
<script setup lang="ts">
import type { RichTextLink } from './Types'
const { href } = defineProps<RichTextLink>()
const isExternal = href.startsWith('http')
</script>