diff --git a/packages/core/.storybook/manager.jsx b/packages/core/.storybook/manager.jsx index 18d90f52a1..1d2cbde815 100644 --- a/packages/core/.storybook/manager.jsx +++ b/packages/core/.storybook/manager.jsx @@ -1,8 +1,9 @@ -import { addons } from "@storybook/manager-api"; import React from "react"; +import { addons } from "@storybook/manager-api"; import { SidebarItem } from "vibe-storybook-components"; import "vibe-storybook-components/index.css"; import theme from "./theme"; +import isChromatic from "chromatic/isChromatic"; window.STORYBOOK_GA_ID = "UA-308574295"; window.STORYBOOK_REACT_GA_OPTIONS = {}; @@ -24,6 +25,15 @@ addons.setConfig({ } return {name.replace(storyStatus, "").trim()}; + }, + filters: { + patterns: filterStory } } }); + +function filterStory(item) { + const isDev = isChromatic() || process.env.NODE_ENV === "development"; + const isInternal = !item.tags?.includes?.("internal") && !item.title?.startsWith?.("Internal"); + return isDev || isInternal; +} diff --git a/packages/core/.storybook/preview.tsx b/packages/core/.storybook/preview.tsx index 5323cb1a33..51f0a67a7d 100644 --- a/packages/core/.storybook/preview.tsx +++ b/packages/core/.storybook/preview.tsx @@ -97,6 +97,7 @@ const preview: Preview = { "Catalog", "Change Log", "Typography Migration Guide", + "Internal", "Foundations", "Buttons", "Inputs", diff --git a/packages/core/src/storybook/stand-alone-documentaion/catalog/catalog.stories.tsx b/packages/core/src/storybook/stand-alone-documentaion/catalog/catalog.stories.tsx index ce32929ce5..c0e93821f8 100644 --- a/packages/core/src/storybook/stand-alone-documentaion/catalog/catalog.stories.tsx +++ b/packages/core/src/storybook/stand-alone-documentaion/catalog/catalog.stories.tsx @@ -1,7 +1,8 @@ import { CatalogTemplate } from "./Catalog/Catalog.stories.templates"; export default { - title: "Catalog" + title: "Catalog", + tags: ["internal"] }; export const Catalog = {