ff-webpage/components/field/Type.vue

16 lines
387 B
Vue
Raw Normal View History

<template>
<FieldText v-if="data?.type == 'text'" :data="[data]" />
<NuxtLink v-else :href="data?.url" class="text-primary">
<FieldText :data="data?.children" />
</NuxtLink>
</template>
<script setup lang="ts">
import type { PropType } from "vue";
import type { TypeField } from "../../types/field/content";
defineProps({
data: Object as PropType<TypeField>,
});
</script>