From c655587d77e64e1d63d59062be6eae7897a774ca Mon Sep 17 00:00:00 2001 From: Jesse Pinho Date: Tue, 9 Jul 2024 14:43:56 -0700 Subject: [PATCH] Only add deprecated CSS to deprecated components --- packages/ui/.storybook/{preview.js => preview.jsx} | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) rename packages/ui/.storybook/{preview.js => preview.jsx} (54%) diff --git a/packages/ui/.storybook/preview.js b/packages/ui/.storybook/preview.jsx similarity index 54% rename from packages/ui/.storybook/preview.js rename to packages/ui/.storybook/preview.jsx index e724a3eff1..944dddeca8 100644 --- a/packages/ui/.storybook/preview.js +++ b/packages/ui/.storybook/preview.jsx @@ -1,8 +1,19 @@ -import '../styles/globals.css'; +import React from 'react'; +import globalsCssUrl from '../styles/globals.css?url'; import penumbraTheme from './penumbraTheme'; /** @type { import('@storybook/react').Preview } */ const preview = { + decorators: [ + (Story, { title }) => ( + <> + {title.startsWith('Deprecated/') && ( + + )} + + + ), + ], parameters: { actions: { argTypesRegex: '^on[A-Z].*' }, controls: {