summaryrefslogtreecommitdiff
path: root/examples/with-markdoc/src/components/DocsContent.astro
blob: 162c1fc6d0c463def42b47b5cffc081a0a83aab7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
import Aside from './Aside.astro';
import type { CollectionEntry } from 'astro:content';

type Props = {
	entry: CollectionEntry<'docs'>;
};

const { entry } = Astro.props;
const { Content } = await entry.render();
---

<Content
	components={{
		// Pass a mapping from the component name
		// To an Astro or UI component import
		// See your `astro.config.mjs` for
		// for the Markdoc tag mapping
		Aside,
	}}
/>

<style is:global>
	table {
		margin-block: 2rem;
		margin-inline: auto;
	}
	table td {
		padding-block: 0.3rem;
		padding-inline: 0.5rem;
	}
</style>