mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
docs: show HTML attribute name in API prop details (#817)
This commit is contained in:
@@ -19,14 +19,15 @@ interface Props {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
attributeName?: string;
|
||||
detailedType?: string;
|
||||
description?: string;
|
||||
colspan: number;
|
||||
}
|
||||
|
||||
const { id, name, type, detailedType, description, colspan } = Astro.props;
|
||||
const { id, name, type, attributeName, detailedType, description, colspan } = Astro.props;
|
||||
|
||||
const hasDetail = Boolean(detailedType || description);
|
||||
const hasDetail = Boolean(attributeName || detailedType || description);
|
||||
---
|
||||
|
||||
<Tr
|
||||
@@ -68,6 +69,15 @@ const hasDetail = Boolean(detailedType || description);
|
||||
class="grid grid-cols-(--cols) gap-x-6 gap-y-3"
|
||||
style="--cols: auto 1fr"
|
||||
>
|
||||
{attributeName && (
|
||||
<>
|
||||
<dt class="font-bold">Attribute</dt>
|
||||
<dd>
|
||||
<MarkdownCode>{attributeName}</MarkdownCode>
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
|
||||
{description && (
|
||||
<>
|
||||
<dt class="font-bold">Description</dt>
|
||||
|
||||
Reference in New Issue
Block a user