diff --git a/2nd-gen/packages/swc/.storybook/DocumentTemplate.mdx b/2nd-gen/packages/swc/.storybook/DocumentTemplate.mdx
index 274cda1adb..6c19228e63 100644
--- a/2nd-gen/packages/swc/.storybook/DocumentTemplate.mdx
+++ b/2nd-gen/packages/swc/.storybook/DocumentTemplate.mdx
@@ -1,22 +1,11 @@
import {
- Meta,
- Title,
- Primary,
- Controls,
- Stories,
- ArgTypes,
Description,
- Subtitle,
HeaderMdx,
+ Meta,
+ Stories,
useOf,
} from '@storybook/addon-docs/blocks';
-import {
- ApiTable,
- GettingStarted,
- OverviewStory,
- SpectrumStories,
- StatusBadge,
-} from './blocks';
+import { DocsFooter, DocsHeader, SpectrumStories } from './blocks';
export const checkIsSingleStory = () => {
const resolvedOf = useOf('meta', ['meta']);
@@ -64,56 +53,12 @@ export const ConditionalSection = ({ tag, title, hideTitle = false }) => {
);
-};
-export const ConditionalAPISection = () => {
-const resolvedOf = useOf('meta', ['meta']);
-const tags = resolvedOf?.csfFile?.meta?.tags ?? [];
-const hasCustomAPIDocs = tags.includes('api') || Object.values(resolvedOf.csfFile.stories).some(
-(story) => story.tags?.includes('api')
-);
-
- if (!hasCustomAPIDocs) {
- return (
- <>
-
+ Have feedback or questions?{' '} + + Open an issue + + . +
+ > + ); +}; diff --git a/2nd-gen/packages/swc/.storybook/blocks/DocsHeader.tsx b/2nd-gen/packages/swc/.storybook/blocks/DocsHeader.tsx new file mode 100644 index 0000000000..70f46130dd --- /dev/null +++ b/2nd-gen/packages/swc/.storybook/blocks/DocsHeader.tsx @@ -0,0 +1,52 @@ +/** + * Copyright 2026 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + Description, + Subtitle, + Title, + useOf, +} from '@storybook/addon-docs/blocks'; +import React from 'react'; + +import { GettingStarted } from './GettingStarted'; +import { OverviewStory } from './OverviewStory'; +import { StatusBadge } from './StatusBadge'; + +/** + * The standard top of a Storybook docs page: title, status badge, subtitle, + * description, overview story, and getting-started instructions. Genre-aware + * via meta tags (`migrated`, `controller`, `utility`); component, pattern, + * and controller pages all use this single block. + * + * Authors compose a docs page as: + * + * + *