From bcf8042a2f98eb1228fa2107cfc8e1e8f90f7005 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sat, 21 Mar 2026 17:52:36 +0000 Subject: [PATCH] Improve styles for Header Signed-off-by: Charles de Dreuille --- .storybook/themes/spotify.css | 11 +- .../src/components/Header/Header.stories.tsx | 40 ----- .../PluginHeader/PluginHeader.stories.tsx | 8 +- .../recipes/PluginHeaderAndHeader.stories.tsx | 164 +++++------------- 4 files changed, 54 insertions(+), 169 deletions(-) diff --git a/.storybook/themes/spotify.css b/.storybook/themes/spotify.css index 47706497d8..add82b87ab 100644 --- a/.storybook/themes/spotify.css +++ b/.storybook/themes/spotify.css @@ -258,19 +258,12 @@ } .bui-PluginHeaderTabsWrapper { - margin: 0; padding: 0; border: none; background: none; } -} -[data-theme-mode='light'][data-theme-name='spotify'] { - .bui-HeaderToolbarWrapper { - border: 1px solid var(--bui-border-2); - } - - .bui-HeaderTabsWrapper { - border: 1px solid var(--bui-border-2); + .bui-PluginHeaderTabsWrapper { + margin-left: -8px; } } diff --git a/packages/ui/src/components/Header/Header.stories.tsx b/packages/ui/src/components/Header/Header.stories.tsx index 0adfb43d55..82f0df7311 100644 --- a/packages/ui/src/components/Header/Header.stories.tsx +++ b/packages/ui/src/components/Header/Header.stories.tsx @@ -95,42 +95,6 @@ const withRouter = (Story: StoryFn) => ( ); -// Extract layout decorator as a reusable constant -const layoutDecorator = [ - (Story: StoryFn) => ( - <> -
-
- - - - Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, - quos. - - -
- - ), -]; - export const Default = meta.story({ args: { title: 'Page Title', @@ -208,10 +172,6 @@ export const WithEverything = meta.story({ ), }); -export const WithLayout = WithEverything.extend({ - decorators: [...layoutDecorator], -}); - export const WithTabsMatchingStrategies = meta.story({ args: { title: 'Route Matching Demo', diff --git a/packages/ui/src/components/PluginHeader/PluginHeader.stories.tsx b/packages/ui/src/components/PluginHeader/PluginHeader.stories.tsx index faadd4fc67..815fadf6e7 100644 --- a/packages/ui/src/components/PluginHeader/PluginHeader.stories.tsx +++ b/packages/ui/src/components/PluginHeader/PluginHeader.stories.tsx @@ -119,11 +119,11 @@ export const WithCustomActions = meta.story({ {...args} customActions={ <> - } /> - } /> - } /> + } /> + } /> + } /> - } /> + } /> {menuItems.map(option => ( ( + <> + } title="APIs" /> + + + ), +}); -export const CatalogEntityPage = meta.story({ +export const SimpleHeader = meta.story({ + decorators: [withLayout], + render: () => ( + <> + } title="APIs" /> +
+ + + ), +}); + +export const WithTabs = meta.story({ decorators: [withLayout], render: () => ( <> @@ -126,17 +143,6 @@ export const CatalogEntityPage = meta.story({ />
} />
+ } @@ -309,18 +256,3 @@ export const SecurityAuditPage = meta.story({ ), }); - -// --------------------------------------------------------------------------- -// Story: Minimal — no tabs, no actions -// --------------------------------------------------------------------------- - -export const Minimal = meta.story({ - decorators: [withLayout], - render: () => ( - <> - } title="APIs" titleLink="/" /> -
- - - ), -});