Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): show CheckIndicator in properties preview (#5972)

홍규진62b86f9e6bfd
diff --git a/.changeset/check-indicator-playground-default.md b/.changeset/check-indicator-playground-default.md
new file mode 100644
index 0000000000..e85ca9baea
--- /dev/null
+++ b/.changeset/check-indicator-playground-default.md
@@ -0,0 +1,9 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] CheckIndicator: start the docsite properties preview in the checked state (#5972)
+
+Seeds a `checked` playground default so the properties-tab preview shows a visible indicator on first load instead of an empty stage.
+
+@Kyujenius
diff --git a/apps/docsite/src/__tests__/data-extraction.test.ts b/apps/docsite/src/__tests__/data-extraction.test.ts
index 5e96da5855..4b2fa5b300 100644
--- a/apps/docsite/src/__tests__/data-extraction.test.ts
+++ b/apps/docsite/src/__tests__/data-extraction.test.ts
@@ -1073,6 +1073,19 @@ describe('Card playground defaults', () => {
});
});
+describe('CheckIndicator playground defaults (#5890)', () => {
+ it('starts the Properties preview in its visible checked state', () => {
+ const checkIndicator = Object.values(components)
+ .flat()
+ .find(component => component.name === 'CheckIndicator');
+
+ expect(checkIndicator).toBeDefined();
+ expect(checkIndicator!.playground?.defaults).toMatchObject({
+ state: 'checked',
+ });
+ });
+});
+
describe('DropdownMenu adaptive-presentation example', () => {
it('documents the presentation choice for the Properties tab', () => {
const dropdownMenu = Object.values(components)
diff --git a/packages/core/src/Indicator/Indicator.doc.mjs b/packages/core/src/Indicator/Indicator.doc.mjs
index d416f4dd54..3270906503 100644
--- a/packages/core/src/Indicator/Indicator.doc.mjs
+++ b/packages/core/src/Indicator/Indicator.doc.mjs
@@ -89,6 +89,9 @@ export const docs = {
'Rendered INSTEAD of the mark, in every state: a host showing a pending Spinner passes it through whether or not the row is chosen.',
},
],
+ playground: {
+ defaults: {state: 'checked'},
+ },
},
{
name: 'RadioIndicator',