diff --git a/packages/frontend/.storybook/preview.ts b/packages/frontend/.storybook/preview.ts index 003536205..5930932d0 100644 --- a/packages/frontend/.storybook/preview.ts +++ b/packages/frontend/.storybook/preview.ts @@ -1,6 +1,7 @@ import { addons } from '@storybook/addons'; import { FORCE_REMOUNT } from '@storybook/core-events'; import { type Preview, setup } from '@storybook/vue3'; +import isChromatic from 'chromatic/isChromatic'; import { initialize, mswDecorator } from 'msw-storybook-addon'; import locale from './locale'; import { commonHandlers, onUnhandledRequest } from './mocks'; @@ -18,6 +19,8 @@ function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme const theme = themes[document.documentElement.dataset.misskeyTheme]; if (theme) { applyTheme(themes[document.documentElement.dataset.misskeyTheme]); + } else if (isChromatic()) { + applyTheme(themes['l-light']); } const observer = new MutationObserver((entries) => { for (const entry of entries) { diff --git a/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts b/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts index 4ed035aed..65405a9bc 100644 --- a/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts +++ b/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts @@ -24,7 +24,7 @@ export const Default = { }; }, args: { - static: isChromatic, + static: isChromatic(), }, parameters: { layout: 'centered', diff --git a/packages/frontend/src/components/global/MkLoading.stories.impl.ts b/packages/frontend/src/components/global/MkLoading.stories.impl.ts index c3acc0e4c..9dcc0cdea 100644 --- a/packages/frontend/src/components/global/MkLoading.stories.impl.ts +++ b/packages/frontend/src/components/global/MkLoading.stories.impl.ts @@ -24,7 +24,7 @@ export const Default = { }; }, args: { - static: isChromatic, + static: isChromatic(), }, parameters: { layout: 'centered',