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 c62650d commit 39b6fbbCopy full SHA for 39b6fbb
.storybook/preview.ts
@@ -7,7 +7,7 @@ import i18n, { baseLocales } from "./i18next"
7
8
const extendedTheme = extendBaseTheme(theme)
9
10
-const chakraBreakpointArray = Object.entries(extendedTheme.breakpoints)
+export const chakraBreakpointArray = Object.entries(extendedTheme.breakpoints)
11
12
const preview: Preview = {
13
globals: {
@@ -23,6 +23,22 @@ const preview: Preview = {
23
date: /Date$/i,
24
},
25
26
+ chromatic: {
27
+ modes: {
28
+ ...chakraBreakpointArray.reduce<{ [x: string]: { viewport: string } }>(
29
+ (arr, curr) => {
30
+ const [token] = curr
31
+ return {
32
+ ...arr,
33
+ [token]: {
34
+ viewport: token,
35
+ },
36
+ }
37
38
+ {}
39
+ ),
40
41
42
backgrounds: {
43
disable: true,
44
0 commit comments