From 7dee17855dfd6196affd4fb824d85b1f2f1a7ad6 Mon Sep 17 00:00:00 2001 From: Jamie Henson Date: Thu, 21 Nov 2024 13:54:05 +0000 Subject: [PATCH] chore: revise Storybook category names and order --- .storybook/application.css | 3 +- .storybook/preview.tsx | 6 +- src/core/Accordion/Accordion.stories.tsx | 2 +- src/core/Code/Code.stories.tsx | 2 +- .../Code/__snapshots__/Code.stories.tsx.snap | 10 +- .../ContactFooter/ContactFooter.stories.tsx | 2 +- .../ContactFooter.stories.tsx.snap | 2 +- .../CookieMessage/CookieMessage.stories.tsx | 2 +- .../CookieMessage.stories.tsx.snap | 2 +- .../CustomerLogos/CustomerLogos.stories.tsx | 2 +- .../CustomerLogos.stories.tsx.snap | 2 +- .../DropdownMenu/DropdownMenu.stories.tsx | 2 +- .../DropdownMenu.stories.tsx.snap | 2 +- src/core/Expander/Expander.stories.tsx | 2 +- .../__snapshots__/Expander.stories.tsx.snap | 10 +- .../FeaturedLink/FeaturedLink.stories.tsx | 2 +- .../FeaturedLink.stories.tsx.snap | 12 +- src/core/Flash/Flash.stories.tsx | 2 +- .../__snapshots__/Flash.stories.tsx.snap | 2 +- src/core/Footer/Footer.stories.tsx | 2 +- .../__snapshots__/Footer.stories.tsx.snap | 2 +- src/core/Icon/Icon.stories.tsx | 2 +- .../Icon/__snapshots__/Icon.stories.tsx.snap | 16 +- src/core/Loader/Loader.stories.tsx | 2 +- .../__snapshots__/Loader.stories.tsx.snap | 6 +- src/core/Logo/Logo.stories.tsx | 2 +- .../Logo/__snapshots__/Logo.stories.tsx.snap | 2 +- src/core/Meganav/Meganav.stories.tsx | 2 +- src/core/ProductTile/ProductTile.stories.tsx | 2 +- .../ProductTile.stories.tsx.snap | 6 +- src/core/Slider/Slider.stories.tsx | 2 +- .../__snapshots__/Slider.stories.tsx.snap | 6 +- src/core/Status/Status.stories.tsx | 2 +- src/core/Table/Table.stories.tsx | 2 +- .../__snapshots__/Table.stories.tsx.snap | 2 +- src/core/Tooltip/Tooltip.stories.tsx | 2 +- .../__snapshots__/Tooltip.stories.tsx.snap | 6 +- src/core/styles/Forms.stories.tsx | 2 +- src/core/styles/Layout.stories.tsx | 2 +- src/core/styles/LegacyButton.stories.tsx | 2 +- src/core/styles/Shadows.stories.tsx | 2 +- src/core/styles/Typography.stories.tsx | 2 +- .../__snapshots__/Forms.stories.tsx.snap | 10 +- .../__snapshots__/Layout.stories.tsx.snap | 12 +- .../LegacyButton.stories.tsx.snap | 250 ++++++++++++++++++ .../__snapshots__/Shadows.stories.tsx.snap | 6 +- .../__snapshots__/Typography.stories.tsx.snap | 90 +++---- src/core/styles/colors/Colors.stories.tsx | 2 +- .../__snapshots__/Colors.stories.tsx.snap | 174 ++++++------ 49 files changed, 470 insertions(+), 219 deletions(-) create mode 100644 src/core/styles/__snapshots__/LegacyButton.stories.tsx.snap diff --git a/.storybook/application.css b/.storybook/application.css index 7bb271778..5c255b7df 100644 --- a/.storybook/application.css +++ b/.storybook/application.css @@ -46,13 +46,14 @@ .ui-theme-dark .sbdocs-content > *, .ui-theme-dark .sb-anchor > h3, .ui-theme-dark .sb-anchor > p, +.ui-theme-dark .sb-anchor > div > p, .ui-theme-dark .sb-anchor > p > code { @apply text-neutral-000; } .ui-theme-dark .sbdocs td, .ui-theme-dark .sbdocs th { - @apply text-neutral-200; + @apply !text-neutral-200; } .ui-theme-dark .sbdocs td { diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 96a24aa1c..c0dd1612f 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -37,7 +37,7 @@ const preview = { options: { storySort: { method: "alphabetical", - order: ["CSS", "Features", "JS Components", "Brand"], + order: ["Features", "Components", "Styles"], }, }, darkMode: { @@ -52,8 +52,8 @@ const preview = { brandImage: brandImage, }, stylePreview: true, - darkClass: ["ui-theme-dark"], - lightClass: ["ui-theme-light"], + darkClass: "ui-theme-dark", + lightClass: "ui-theme-light", }, }, loaders: [mswLoader], diff --git a/src/core/Accordion/Accordion.stories.tsx b/src/core/Accordion/Accordion.stories.tsx index 2060c8ecb..b95ef54e4 100644 --- a/src/core/Accordion/Accordion.stories.tsx +++ b/src/core/Accordion/Accordion.stories.tsx @@ -74,7 +74,7 @@ const AccordionPresentation = ({ data, options }: AccordionProps) => ( ); export default { - title: "JS Components/Accordion", + title: "Components/Accordion", component: Accordion, }; diff --git a/src/core/Code/Code.stories.tsx b/src/core/Code/Code.stories.tsx index f7c210abf..bbf4d5c3f 100644 --- a/src/core/Code/Code.stories.tsx +++ b/src/core/Code/Code.stories.tsx @@ -1,7 +1,7 @@ import Code from "../Code"; export default { - title: "JS Components/Code", + title: "Components/Code", component: Code, tags: ["autodocs"], }; diff --git a/src/core/Code/__snapshots__/Code.stories.tsx.snap b/src/core/Code/__snapshots__/Code.stories.tsx.snap index 4cef5e33b..afb08987a 100644 --- a/src/core/Code/__snapshots__/Code.stories.tsx.snap +++ b/src/core/Code/__snapshots__/Code.stories.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`JS Components/Code CodeWithLines smoke-test 1`] = ` +exports[`Components/Code CodeWithLines smoke-test 1`] = `
@@ -98,7 +98,7 @@ exports[`JS Components/Code CodeWithLines smoke-test 1`] = `
`; -exports[`JS Components/Code Java smoke-test 1`] = ` +exports[`Components/Code Java smoke-test 1`] = `
@@ -179,7 +179,7 @@ channel.subscribe(
`; -exports[`JS Components/Code Javascript smoke-test 1`] = ` +exports[`Components/Code Javascript smoke-test 1`] = `
@@ -254,7 +254,7 @@ exports[`JS Components/Code Javascript smoke-test 1`] = `
`; -exports[`JS Components/Code Kotlin smoke-test 1`] = ` +exports[`Components/Code Kotlin smoke-test 1`] = `
@@ -309,7 +309,7 @@ exports[`JS Components/Code Kotlin smoke-test 1`] = `
`; -exports[`JS Components/Code Swift smoke-test 1`] = ` +exports[`Components/Code Swift smoke-test 1`] = `
diff --git a/src/core/ContactFooter/ContactFooter.stories.tsx b/src/core/ContactFooter/ContactFooter.stories.tsx index 60042c472..eb7a2f6ff 100644 --- a/src/core/ContactFooter/ContactFooter.stories.tsx +++ b/src/core/ContactFooter/ContactFooter.stories.tsx @@ -1,7 +1,7 @@ import ContactFooter from "../ContactFooter"; export default { - title: "JS Components/Contact Footer", + title: "Components/Contact Footer", component: ContactFooter, parameters: { layout: "fullscreen", diff --git a/src/core/ContactFooter/__snapshots__/ContactFooter.stories.tsx.snap b/src/core/ContactFooter/__snapshots__/ContactFooter.stories.tsx.snap index 82458df10..9fa2fdb17 100644 --- a/src/core/ContactFooter/__snapshots__/ContactFooter.stories.tsx.snap +++ b/src/core/ContactFooter/__snapshots__/ContactFooter.stories.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`JS Components/Contact Footer Default smoke-test 1`] = ` +exports[`Components/Contact Footer Default smoke-test 1`] = `