2026-03-15 23:23:29 -05:00
|
|
|
---
|
|
|
|
|
import type { CollectionEntry } from "astro:content";
|
2026-03-15 23:29:33 -05:00
|
|
|
import { api } from "../core/api/dynamic";
|
2026-03-15 23:23:29 -05:00
|
|
|
import { Code } from "./Code";
|
|
|
|
|
import { Heading } from "./Heading";
|
|
|
|
|
import { MarkdownCustom } from "./MarkdownCustom";
|
|
|
|
|
|
|
|
|
|
interface Props {
|
2026-03-15 23:29:33 -05:00
|
|
|
locale: string;
|
2026-03-15 23:23:29 -05:00
|
|
|
apis: CollectionEntry<"api">[];
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-15 23:29:33 -05:00
|
|
|
const { apis, locale } = Astro.props;
|
|
|
|
|
const strings = await api.strings(locale);
|
2026-03-15 23:23:29 -05:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.container {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: var(--space-4);
|
2026-03-15 23:29:33 -05:00
|
|
|
|
|
|
|
|
.docs {
|
|
|
|
|
margin-left: var(--space-5);
|
|
|
|
|
}
|
2026-03-15 23:23:29 -05:00
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
apis
|
|
|
|
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
|
|
|
.map((api) => (
|
|
|
|
|
<div class="container">
|
|
|
|
|
<Heading size="3">
|
|
|
|
|
<Code>{api.id}</Code>
|
|
|
|
|
</Heading>
|
|
|
|
|
|
2026-03-15 23:29:33 -05:00
|
|
|
<MarkdownCustom
|
|
|
|
|
className="docs"
|
|
|
|
|
body={api.data.docs ?? strings.api.no_docs}
|
|
|
|
|
/>
|
2026-03-15 23:23:29 -05:00
|
|
|
</div>
|
|
|
|
|
))
|
|
|
|
|
}
|