feat: Initial TheSections

This commit is contained in:
2025-09-22 11:49:48 -04:00
parent c6fce32c54
commit fe2b500684
10 changed files with 78 additions and 28 deletions

View File

@@ -0,0 +1,3 @@
fragment SectionTextBlock on GroupAbstractBuilderSectionsTextBlockLayout {
content
}

View File

@@ -0,0 +1,11 @@
<script setup lang="ts">
import type { SectionTextBlockFragment } from "#graphql-operations";
defineProps<SectionTextBlockFragment>();
</script>
<template>
<section data-section-type="text-block">
<div v-html="content" />
</section>
</template>

View File

@@ -0,0 +1,6 @@
fragment TheSection on GroupAbstractBuilderSections_Layout {
fieldGroupName
... on GroupAbstractBuilderSectionsTextBlockLayout {
...SectionTextBlock
}
}

View File

@@ -0,0 +1,10 @@
<script setup lang="ts">
import type { TheSectionFragment } from "#graphql-operations";
const props = defineProps<{ sections: (TheSectionFragment)[] }>();
const sections = props.sections.map(useSection);
</script>
<template>
<component :is="component" v-for="({ component, attrs }, i) in sections" :key="i" v-bind="attrs" />
</template>