Skip to content

Commit 9ae5629

Browse files
authored
chore: revert "docs(ui): add dark theme for storybook docs (#2062)" (#2167)
1 parent f0ada7e commit 9ae5629

File tree

6 files changed

+7
-46
lines changed

6 files changed

+7
-46
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { StorybookConfig } from '@storybook-vue/nuxt'
22

33
const config = {
4-
stories: ['../.storybook/*.mdx', '../app/**/*.stories.@(js|ts)'],
4+
stories: ['../app/**/*.stories.@(js|ts)'],
55
addons: ['@storybook/addon-a11y', '@storybook/addon-docs', '@storybook/addon-themes'],
66
framework: '@storybook-vue/nuxt',
77
staticDirs: ['./.public'],

.storybook/manager.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
import { addons } from 'storybook/manager-api'
2+
import { create } from 'storybook/theming'
23

3-
import npmxDark from './theme'
4+
const npmxTheme = create({
5+
brandTitle: 'npmx Storybook',
6+
brandImage: '/npmx-storybook.svg',
7+
})
48

59
addons.setConfig({
6-
theme: npmxDark,
7-
layoutCustomisations: {
8-
showToolbar: (state, defaultValue) => {
9-
if (state.viewMode === 'docs' && state.storyId) {
10-
const story = state.index?.[state.storyId]
11-
const tags = story?.tags || []
12-
if (tags.includes('hide-toolbar')) {
13-
return false
14-
}
15-
}
16-
return defaultValue
17-
},
18-
},
10+
theme: npmxTheme,
1911
})

.storybook/preview-head.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

.storybook/preview.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { currentLocales } from '../config/i18n'
44
import { fn } from 'storybook/test'
55
import { ACCENT_COLORS } from '../shared/utils/constants'
66

7-
import npmxDark from './theme'
8-
97
// related: https://github.com/npmx-dev/npmx.dev/blob/1431d24be555bca5e1ae6264434d49ca15173c43/test/nuxt/setup.ts#L12-L26
108
// Stub Nuxt specific globals
119
// @ts-expect-error - dynamic global name
@@ -27,9 +25,6 @@ const preview: Preview = {
2725
date: /Date$/i,
2826
},
2927
},
30-
docs: {
31-
theme: npmxDark,
32-
},
3328
},
3429
// Provides toolbars to switch things like theming and language
3530
globalTypes: {

.storybook/storybook-welcome.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.

.storybook/theme.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)