An open source design system that's fully customizable and agent ready
TypeScript
fix(docsite): wrap MetadataListItem preview in MetadataList (#3318)
IFAKA77fe3d729b18
diff --git a/apps/docsite/src/__tests__/data-extraction.test.ts b/apps/docsite/src/__tests__/data-extraction.test.tsindex b47f47df48..a1efd419a6 100644--- a/apps/docsite/src/__tests__/data-extraction.test.ts+++ b/apps/docsite/src/__tests__/data-extraction.test.ts@@ -284,6 +284,19 @@ describe('componentRegistry', () => {});});+ it('MetadataListItem declares a playground wrapper for realistic preview structure', () => {+ const core = components['@astryxdesign/core'];+ const metadataListItem = core.find(c => c.name === 'MetadataListItem');+ expect(metadataListItem).toBeDefined();+ expect(metadataListItem!.playground?.defaults).toMatchObject({+ label: 'Status',+ children: 'Active',+ });+ expect(metadataListItem!.playground?.wrapper).toMatchObject({+ component: 'MetadataList',+ });+ });+it('Chat has many sub-components (standalone docs take priority over compound entries)', () => {const core = components['@astryxdesign/core'];// Chat compound doc has 14 sub-components, but ChatToolCalls anddiff --git a/packages/core/src/MetadataList/MetadataListItem.doc.mjs b/packages/core/src/MetadataList/MetadataListItem.doc.mjsindex c4e9d6089e..24c47cf3d5 100644--- a/packages/core/src/MetadataList/MetadataListItem.doc.mjs+++ b/packages/core/src/MetadataList/MetadataListItem.doc.mjs@@ -8,6 +8,10 @@ export const docs = {displayName: 'Metadata List Item',isHiddenFromOverview: true,description: 'A single labeled metadata value within an MetadataList.',+ playground: {+ defaults: {label: 'Status', children: 'Active'},+ wrapper: {component: 'MetadataList'},+ },props: [{name: 'children',