component formatting and types
This commit is contained in:
parent
c2a7d15eeb
commit
ce745c06e5
60 changed files with 464 additions and 301 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue