ADD: icons for RichTextLink
Hard coded RichTextLink icons
This commit is contained in:
parent
cc8e4eb1bd
commit
9a1b1acfee
4 changed files with 9 additions and 19 deletions
|
@ -1,12 +1,14 @@
|
|||
<template>
|
||||
<a :href="href" :target="target" class="text inline-flex-row" :class="{ reverse : icon && icon.position === 'end' }">
|
||||
<Icon v-if="icon" :name="icon.name" mode="svg" />
|
||||
<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'
|
||||
|
||||
defineProps<RichTextLink>()
|
||||
const { href } = defineProps<RichTextLink>()
|
||||
|
||||
const linkIcon = href.startsWith('http') ? 'globe' : 'arrow-square-in'
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue