Skip to content

Commit 87b28b8

Browse files
committed
add maps and drive types
1 parent 0bb3c2e commit 87b28b8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/blocks/helpers/figure.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { useNotionBlock, defineNotionProps } from "@/lib/blockable"
33
import NotionAsset from "@/blocks/helpers/asset.vue"
44
import NotionImage from "@/blocks/helpers/image.vue"
5+
import NotionGoogleDrive from "@/blocks/helpers/google-drive.vue"
56
import NotionTextRenderer from "@/blocks/helpers/text-renderer.vue"
67
78
const props = defineProps({ ...defineNotionProps })
@@ -17,7 +18,8 @@ export default {
1718
<template>
1819
<figure class="notion-asset-wrapper" :style="width">
1920
<NotionImage v-if="isType('image')" v-bind="pass" />
20-
<NotionAsset v-else-if="isType(['embed', 'video', 'figma'])" v-bind="pass" />
21+
<NotionAsset v-else-if="isType(['embed', 'video', 'figma', 'maps'])" v-bind="pass" />
22+
<NotionGoogleDrive v-else-if="isType('drive')" v-bind="pass" />
2123
<figcaption v-if="caption" class="notion-image-caption">
2224
<NotionTextRenderer :text="caption" v-bind="pass" />
2325
</figcaption>

src/components/block.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const props = defineProps({ ...defineNotionProps })
2727
//@ts-ignore
2828
const { pass, type, format, isType } = useNotionBlock(props)
2929
if (!availableType.includes(type.value)) console.warn(`${type.value.toUpperCase()} is not implemented yet`)
30-
// console.log(type.value)
3130
</script>
3231

3332
<template>
@@ -56,7 +55,7 @@ if (!availableType.includes(type.value)) console.warn(`${type.value.toUpperCase(
5655
<NotionList v-else-if="isType(['bulleted_list', 'numbered_list'])" v-bind="pass">
5756
<slot />
5857
</NotionList>
59-
<NotionFigure v-else-if="isType(['image', 'embed', 'figma', 'video', 'audio'])" v-bind="pass" />
58+
<NotionFigure v-else-if="isType(['image', 'embed', 'figma', 'video', 'audio', 'drive', 'maps'])" v-bind="pass" />
6059
<NotionTable v-else-if="isType('table')" v-bind="pass"><slot /></NotionTable>
6160
<NotionTableRow v-else-if="isType('table_row')" v-bind="pass" />
6261
<NotionTableOfContents v-else-if="isType('table_of_contents')" v-bind="pass"></NotionTableOfContents>

0 commit comments

Comments
 (0)