Skip to content
Snippets Groups Projects
Unverified Commit faf827a5 authored by Acid Chicken (硫酸鶏)'s avatar Acid Chicken (硫酸鶏)
Browse files

build(#10336): isChromatic

parent 388ecfb1
No related branches found
No related tags found
No related merge requests found
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) {
......
......@@ -24,7 +24,7 @@ export const Default = {
};
},
args: {
static: isChromatic,
static: isChromatic(),
},
parameters: {
layout: 'centered',
......
......@@ -24,7 +24,7 @@ export const Default = {
};
},
args: {
static: isChromatic,
static: isChromatic(),
},
parameters: {
layout: 'centered',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment