build(#10336): isChromatic
This commit is contained in:
parent
388ecfb1ea
commit
faf827a50a
@ -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) {
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user