mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Benjamin Canac <canacb1@gmail.com>
21 lines
557 B
Vue
21 lines
557 B
Vue
<script setup lang="ts">
|
|
import { kebabCase } from 'scule'
|
|
import type { PropertyMeta } from 'vue-component-meta'
|
|
|
|
const props = defineProps<{
|
|
prop: PropertyMeta
|
|
}>()
|
|
|
|
const route = useRoute()
|
|
|
|
const links = computed(() => props.prop.tags?.filter((tag: any) => tag.name === 'link'))
|
|
</script>
|
|
|
|
<template>
|
|
<ProseUl v-if="links?.length">
|
|
<ProseLi v-for="(link, index) in links" :key="index">
|
|
<MDC :value="link.text ?? ''" class="my-1" :cache-key="`${kebabCase(route.path)}-${prop.name}-link-${index}`" />
|
|
</ProseLi>
|
|
</ProseUl>
|
|
</template>
|