-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArticleBody.astro
18 lines (17 loc) · 1.28 KB
/
ArticleBody.astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
import {PortableText} from "astro-portabletext"
import AlertBox from "../../../../portable-text-components/alert-box/AlertBox.astro"
import CodeBlock from "../../../../portable-text-components/code-block/CodeBlock.astro"
import CanIUse from "../../../../portable-text-components/can-i-use-block/CanIUse.astro"
import VideoBlock from "../../../../portable-text-components/article-video/VideoBlock.astro"
import CustomArticleComponent from './custom-article-components/CustomArticleComponent.astro'
import Heading from "./portable-text-components/heading/Heading.astro"
import Link from "./portable-text-components/link/Link.astro"
import { mergeComponents } from "astro-portabletext/utils"
import BulletList from "./portable-text-components/bullet-list/BulletList.astro"
import PictureBlock from "../../../../portable-text-components/picture-block/PictureBlock.astro"
const { content } = Astro.props
---
<article class:list={[]}>
<PortableText value={content} components={mergeComponents({type: { alertBox: AlertBox, code: CodeBlock, canIUse: CanIUse, articleVideo: VideoBlock, articleCustomComp: CustomArticleComponent, picture: PictureBlock }, block: {h1: Heading, h2: Heading, h3: Heading, h4: Heading, h5: Heading, h6: Heading}, mark: {link: Link}, list: {bullet: BulletList}}, {})} />
</article>