diff --git a/code/lib/cli/src/generators/configure.test.ts b/code/lib/cli/src/generators/configure.test.ts index 4f1ba91004bb..1e80f406e19c 100644 --- a/code/lib/cli/src/generators/configure.test.ts +++ b/code/lib/cli/src/generators/configure.test.ts @@ -85,6 +85,9 @@ describe('configurePreview', () => { expect(previewConfigPath).toEqual('./.storybook/preview.js'); expect(previewConfigContent).toMatchInlineSnapshot(` "export const parameters = { + backgrounds: { + default: 'light', + }, actions: { argTypesRegex: \\"^on[A-Z].*\\" }, controls: { matchers: { @@ -108,6 +111,9 @@ describe('configurePreview', () => { expect(previewConfigPath).toEqual('./.storybook/preview.ts'); expect(previewConfigContent).toMatchInlineSnapshot(` "export const parameters = { + backgrounds: { + default: 'light', + }, actions: { argTypesRegex: \\"^on[A-Z].*\\" }, controls: { matchers: { @@ -150,6 +156,9 @@ describe('configurePreview', () => { import docJson from \\"../documentation.json\\"; setCompodocJson(docJson); export const parameters = { + backgrounds: { + default: 'light', + }, actions: { argTypesRegex: \\"^on[A-Z].*\\" }, controls: { matchers: { diff --git a/code/lib/cli/src/generators/configure.ts b/code/lib/cli/src/generators/configure.ts index 53400d56fe7a..884e47af6f09 100644 --- a/code/lib/cli/src/generators/configure.ts +++ b/code/lib/cli/src/generators/configure.ts @@ -83,6 +83,9 @@ export async function configurePreview(options: ConfigurePreviewOptions) { const preview = dedent` ${prefix} export const parameters = { + backgrounds: { + default: 'light', + }, actions: { argTypesRegex: "^on[A-Z].*" }, controls: { matchers: {