mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add util reference pipeline (#537)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c11395ece1
commit
78112fbefd
@@ -2,21 +2,20 @@
|
||||
/**
|
||||
* Renders the data attributes table for API reference.
|
||||
*/
|
||||
import MarkdownCode from '@/components/typography/MarkdownCode.astro';
|
||||
import Table from '@/components/typography/Table.astro';
|
||||
import Tbody from '@/components/typography/Tbody.astro';
|
||||
import Td from '@/components/typography/Td.astro';
|
||||
import Th from '@/components/typography/Th.astro';
|
||||
import Thead from '@/components/typography/Thead.astro';
|
||||
import Tr from '@/components/typography/Tr.astro';
|
||||
import type { DataAttrDef } from '@/types/api-reference';
|
||||
import InlineMarkdown from './InlineMarkdown.astro';
|
||||
import type { DataAttrDef } from '@/types/component-reference';
|
||||
import DataAttrRow from './DataAttrRow.astro';
|
||||
|
||||
interface Props {
|
||||
dataAttributes: Record<string, DataAttrDef>;
|
||||
componentName: string;
|
||||
}
|
||||
|
||||
const { dataAttributes } = Astro.props;
|
||||
const { dataAttributes, componentName } = Astro.props;
|
||||
|
||||
const attrs = Object.entries(dataAttributes);
|
||||
---
|
||||
@@ -25,18 +24,20 @@ const attrs = Object.entries(dataAttributes);
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>Attribute</Th>
|
||||
<Th>Description</Th>
|
||||
<Th>Type</Th>
|
||||
<Th />
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
{
|
||||
attrs.map(([name, def]) => (
|
||||
<Tr>
|
||||
<Td class="align-top">
|
||||
<MarkdownCode>{name}</MarkdownCode>
|
||||
</Td>
|
||||
<Td><InlineMarkdown content={def.description} /></Td>
|
||||
</Tr>
|
||||
<DataAttrRow
|
||||
name={name}
|
||||
type={def.type}
|
||||
detailedType={def.detailedType}
|
||||
description={def.description}
|
||||
componentName={componentName}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</Tbody>
|
||||
|
||||
Reference in New Issue
Block a user