component formatting and types

This commit is contained in:
Julian Krauser 2025-02-14 13:57:55 +01:00
parent c2a7d15eeb
commit ce745c06e5
60 changed files with 464 additions and 301 deletions

View file

@ -1,9 +1,15 @@
<template>
<div class="w-full h-fit flex flex-col gap-2">
<div v-for="item in data" :key="item.type" class="contents">
<h1 v-if="item.type == 'heading'" class="w-full">
<h1 v-if="item.type == 'heading' && item?.level == 1" class="w-full">
<FieldType v-for="child in item.children" :data="child" />
</h1>
<h2 v-else-if="item.type == 'heading' && item?.level == 2" class="w-full">
<FieldType v-for="child in item.children" :data="child" />
</h2>
<h3 v-else-if="item.type == 'heading'" class="w-full">
<FieldType v-for="child in item.children" :data="child" />
</h3>
<p v-else-if="item.type == 'paragraph'" class="w-full">
<FieldType v-for="child in item.children" :data="child" />
</p>