Skip to content

Commit 6afd6f3

Browse files
authored
Merge pull request #26 from zernonia/25-callout-content-missing
render content inside callout
2 parents 33a5eb8 + f8ea6b1 commit 6afd6f3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/blocks/callout.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
import { useNotionBlock, defineNotionProps } from "@/lib/blockable"
33
import NotionPageIcon from "@/blocks/helpers/page-icon.vue"
44
import NotionTextRenderer from "@/blocks/helpers/text-renderer.vue"
5+
import NotionRenderer from "@/components/notion-renderer.vue"
56
67
const props = defineProps({ ...defineNotionProps })
78
//@ts-ignore
8-
const { pass, title, blockColorClass } = useNotionBlock(props)
9+
const { pass, title, blockColorClass, block } = useNotionBlock(props)
910
</script>
1011

1112
<script lang="ts">
@@ -20,7 +21,16 @@ export default {
2021
<NotionPageIcon v-bind="pass" />
2122
</div>
2223
<div class="notion-callout-text">
23-
<NotionTextRenderer :text="title" v-bind="pass" />
24+
<NotionRenderer
25+
v-if="block.value.content"
26+
v-for="(contentId, contentIndex) in block.value.content"
27+
v-bind="pass"
28+
:key="contentId"
29+
:level="pass.level + 1"
30+
:content-id="contentId"
31+
:content-index="contentIndex"
32+
/>
33+
<NotionTextRenderer v-else :text="title" v-bind="pass" />
2434
</div>
2535
</div>
2636
</template>

0 commit comments

Comments
 (0)