--- /** * Expandable table row used by PropRow and StateRow. * * Uses button disclosure pattern: the summary row has real `` cells, * the detail row is a separate `` toggled via `aria-controls` + `hidden`. * The entire summary row is clickable, delegating to the toggle button. * * The default slot provides the summary cells. This component appends the * toggle-button cell and renders the expandable detail panel beneath. */ import clsx from 'clsx'; import MarkdownCode from '@/components/typography/MarkdownCode.astro'; import Td from '@/components/typography/Td.astro'; import Tr from '@/components/typography/Tr.astro'; import InlineMarkdown from './InlineMarkdown.astro'; interface Props { id: string; name: string; type: string; attributeName?: string; detailedType?: string; description?: string; colspan: number; } const { id, name, attributeName, detailedType, description, colspan } = Astro.props; const hasDetail = Boolean(attributeName || detailedType || description); --- { hasDetail && ( ) } { hasDetail && (
{attributeName && ( <>
Attribute
{attributeName}
)} {description && ( <>
Description
)} {detailedType && ( <>
Type
{detailedType}
)}
) }