From 2ad0f66a0c3af8deca85df092f7e47df54baaf60 Mon Sep 17 00:00:00 2001 From: Olivia Wong Date: Thu, 5 Dec 2024 15:31:10 -0500 Subject: [PATCH] Cleans up docs and tests --- src/components/Template/Template.mdx | 505 ++------------ src/components/Template/Template.stories.tsx | 625 ++++++++++-------- src/components/Template/Template.test.tsx | 308 +-------- src/components/Template/Template.tsx | 397 +---------- src/components/Template/TemplateNew.mdx | 17 - .../Template/TemplateNew.stories.tsx | 313 --------- src/components/Template/TemplateNew.tsx | 46 -- .../Template/templateChangelogData.ts | 9 + src/index.ts | 29 +- src/theme/components/templatenew.ts | 42 +- 10 files changed, 484 insertions(+), 1807 deletions(-) delete mode 100644 src/components/Template/TemplateNew.mdx delete mode 100644 src/components/Template/TemplateNew.stories.tsx delete mode 100644 src/components/Template/TemplateNew.tsx diff --git a/src/components/Template/Template.mdx b/src/components/Template/Template.mdx index 9f4a33c8d..21ee2cc3d 100644 --- a/src/components/Template/Template.mdx +++ b/src/components/Template/Template.mdx @@ -2,499 +2,110 @@ import { ArgTypes, Canvas, Description, Meta, Source } from "@storybook/blocks"; import ComponentChangelogTable from "../../utils/ComponentChangelogTable"; import { changelogData } from "./templateChangelogData"; -import * as TemplateStories from "./Template.stories"; +import * as TemplateNewStories from "./Template.stories"; import { Template, - TemplateAboveHeader, - TemplateAppContainer, TemplateBreakout, - TemplateContent, - TemplateContentBottom, - TemplateContentPrimary, - TemplateContentSidebar, - TemplateContentTop, - TemplateFooter, - TemplateHeader, + TemplateTop, + TemplateSidebar, + TemplateMain, + TemplateMainNarrow, + TemplateBottom, } from "./Template"; import Link from "../Link/Link"; - + # Template -| Component Version | DS Version | -| ----------------- | ---------- | -| Added | `0.3.6` | -| Latest | `3.4.0` | +| Component Version | DS Version | +| ----------------- | ------------ | +| Added | `0.3.6` | +| Latest | `Prerelease` | ## Table of Contents -- {TemplateAppContainer Overview} -- {TemplateAppContainer Component Props} -- {TemplateAppContainer Accessibility} -- {Template Children Overview} -- {Template Children Component Props} -- {Full Example with Template Children Components} +- {Template Overview} +- {Template Props} +- {Template Components} +- {Template Accessibility} +- {Template Sidebar Configuration} - {Changelog} -## TemplateAppContainer Overview +## Template Overview - - -If you have a custom `Header` component that _already_ renders an HTML `
` -element, set `renderHeaderElement` to false so only one `
` element is -rendered. - -If you need to render the `SkipNavigation` component, set `renderSkipNavigation` -to true. - -Likewise, if you have a custom `Footer` component that _already_ renders an HTML -`