An open source design system that's fully customizable and agent ready
TypeScript
docs(cli): promote Outline density example to showcase (#2871) (#3222)
Cindy Zhang1a2aa09f1486
diff --git a/.changeset/outline-showcase.md b/.changeset/outline-showcase.mdnew file mode 100644index 0000000000..95d810961d--- /dev/null+++ b/.changeset/outline-showcase.md@@ -0,0 +1,6 @@+---+'@astryxdesign/cli': patch+---++[docs] Add a showcase block for Outline so its docs page has a hero preview, alongside the existing example blocks (#2871)+@cixzhangdiff --git a/packages/cli/templates/blocks/components/Outline/OutlineShowcase.doc.mjs b/packages/cli/templates/blocks/components/Outline/OutlineShowcase.doc.mjsnew file mode 100644index 0000000000..bfbee3ab3e--- /dev/null+++ b/packages/cli/templates/blocks/components/Outline/OutlineShowcase.doc.mjs@@ -0,0 +1,15 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */+export const doc = {+ type: 'block',+ exampleFor: 'Outline',+ name: 'Outline',+ displayName: 'Outline',+ description:+ 'A document outline with the active section highlighted by the sliding indicator track.',+ isReady: true,+ aspectRatio: 16 / 9,+ isShowcase: true,+ componentsUsed: ['Outline'],+};diff --git a/packages/cli/templates/blocks/components/Outline/OutlineShowcase.tsx b/packages/cli/templates/blocks/components/Outline/OutlineShowcase.tsxnew file mode 100644index 0000000000..e3f3a5ca2f--- /dev/null+++ b/packages/cli/templates/blocks/components/Outline/OutlineShowcase.tsx@@ -0,0 +1,22 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++'use client';++import {Outline} from '@astryxdesign/core/Outline';+import type {OutlineItem} from '@astryxdesign/core/Outline';++const items: OutlineItem[] = [+ {id: 'showcase-overview', label: 'Overview', level: 2},+ {id: 'showcase-installation', label: 'Installation', level: 2},+ {id: 'showcase-theming', label: 'Theming', level: 2},+ {id: 'showcase-tokens', label: 'Tokens', level: 3},+ {id: 'showcase-accessibility', label: 'Accessibility', level: 2},+];++export default function OutlineShowcase() {+ return (+ <div style={{width: 240}}>+ <Outline items={items} activeId="showcase-theming" />+ </div>+ );+}