File tree Expand file tree Collapse file tree 4 files changed +26
-6
lines changed
Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 11import { addons } from 'storybook/manager-api'
2- import { create } from 'storybook/theming'
32
4- const npmxTheme = create ( {
5- brandTitle : 'npmx Storybook' ,
6- brandImage : '/npmx-storybook.svg' ,
7- } )
3+ import npmxDark from './theme'
84
95addons . setConfig ( {
10- theme : npmxTheme ,
6+ theme : npmxDark ,
117} )
Original file line number Diff line number Diff line change 1+ < style >
2+ /* Override docs story canvas background to match npmx theme */
3+ .docs-story {
4+ background-color : var (--bg , oklch (0.171 0 0 )) !important ;
5+ }
6+ </ style >
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { currentLocales } from '../config/i18n'
44import { fn } from 'storybook/test'
55import { ACCENT_COLORS } from '../shared/utils/constants'
66
7+ import npmxDark from './theme'
8+
79// related: https://github.com/npmx-dev/npmx.dev/blob/1431d24be555bca5e1ae6264434d49ca15173c43/test/nuxt/setup.ts#L12-L26
810// Stub Nuxt specific globals
911// @ts -expect-error - dynamic global name
@@ -25,6 +27,9 @@ const preview: Preview = {
2527 date : / D a t e $ / i,
2628 } ,
2729 } ,
30+ docs : {
31+ theme : npmxDark ,
32+ } ,
2833 } ,
2934 // Provides toolbars to switch things like theming and language
3035 globalTypes : {
Original file line number Diff line number Diff line change 1+ import { create } from 'storybook/theming'
2+
3+ const npmxDark = create ( {
4+ base : 'dark' ,
5+
6+ brandTitle : 'npmx Storybook' ,
7+ brandImage : '/npmx-storybook.svg' ,
8+
9+ // UI
10+ appContentBg : '#101010' , // oklch(0.171 0 0)
11+ } )
12+
13+ export default npmxDark
You can’t perform that action at this time.
0 commit comments