mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
chromatic preferred theme is stacked, not side-by-side
This commit is contained in:
parent
8ff2ebad49
commit
c9a237679d
@ -119,8 +119,8 @@ const config: StorybookConfig = {
|
||||
},
|
||||
features: {
|
||||
viewportStoryGlobals: true,
|
||||
themesStoryGlobals: true,
|
||||
backgroundsStoryGlobals: true,
|
||||
// themesStoryGlobals: true,
|
||||
},
|
||||
viteFinal: (viteConfig, { configType }) =>
|
||||
mergeConfig(viteConfig, {
|
||||
|
@ -177,7 +177,7 @@ export const decorators = [
|
||||
theme = 'light';
|
||||
showPlayFnNotice = true;
|
||||
} else if (isChromatic() && !storyGlobals.theme && !playFunction) {
|
||||
theme = 'side-by-side';
|
||||
theme = 'stacked';
|
||||
}
|
||||
|
||||
switch (theme) {
|
||||
|
@ -17,7 +17,6 @@ export const BackgroundTool = memo(function BackgroundSelector() {
|
||||
const [isTooltipVisible, setIsTooltipVisible] = useState(false);
|
||||
|
||||
const { options = emptyBackgroundMap, disable = true } = config || {};
|
||||
|
||||
if (disable) {
|
||||
return null;
|
||||
}
|
||||
|
@ -37,4 +37,5 @@ export const parameters = {
|
||||
const modern: Record<string, GlobalState> = {
|
||||
[KEY]: { value: undefined, grid: false },
|
||||
};
|
||||
|
||||
export const initialGlobals = FEATURES?.backgroundsStoryGlobals ? modern : { [KEY]: null };
|
||||
|
@ -2,7 +2,7 @@ import { PARAM_KEY as KEY } from './constants';
|
||||
import type { GlobalState } from './types';
|
||||
|
||||
const modern: Record<string, GlobalState> = {
|
||||
[KEY]: { value: 'reset', isRotated: false },
|
||||
[KEY]: { value: undefined, isRotated: false },
|
||||
};
|
||||
|
||||
// TODO: remove in 9.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user