wf4/app/components/RichText/Link.vue
webfussel 9a1b1acfee ADD: icons for RichTextLink
Hard coded RichTextLink icons
2025-02-21 19:52:07 +01:00

14 lines
368 B
Vue

<template>
<a :href="href" :target="target" class="text inline-flex-row">
{{ content }}
<Icon :name="`ph:${linkIcon}-duotone`" mode="svg" />
</a>
</template>
<script setup lang="ts">
import type { RichTextLink } from './Types'
const { href } = defineProps<RichTextLink>()
const linkIcon = href.startsWith('http') ? 'globe' : 'arrow-square-in'
</script>