We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9063d55 commit bc318bdCopy full SHA for bc318bd
1 file changed
.storybook/preview.ts
@@ -1,4 +1,20 @@
1
import type { Preview } from '@nuxtjs/storybook'
2
+import { currentLocales } from '../config/i18n'
3
+import { fn } from 'storybook/test'
4
+import { ACCENT_COLORS } from '../shared/utils/constants'
5
+
6
+// related: https://github.com/npmx-dev/npmx.dev/blob/1431d24be555bca5e1ae6264434d49ca15173c43/test/nuxt/setup.ts#L12-L26
7
+// Stub Nuxt specific globals
8
+// @ts-expect-error - dynamic global name
9
+globalThis['__NUXT_COLOR_MODE__'] ??= {
10
+ preference: 'system',
11
+ value: 'dark',
12
+ getColorScheme: fn(() => 'dark'),
13
+ addColorScheme: fn(),
14
+ removeColorScheme: fn(),
15
+}
16
17
+globalThis.defineOgImageComponent = fn()
18
19
const preview: Preview = {
20
parameters: {
0 commit comments