Skip to content

Commit

Permalink
support globals and viewports global config in portable stories
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Oct 11, 2024
1 parent 6b6537b commit a28553f
Show file tree
Hide file tree
Showing 9 changed files with 315 additions and 113 deletions.
2 changes: 0 additions & 2 deletions code/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import { DocsContext } from '@storybook/blocks';
import { global } from '@storybook/global';
import type { Decorator, Loader, ReactRenderer } from '@storybook/react';

import { MINIMAL_VIEWPORTS } from '@storybook/addon-viewport';

import { DocsPageWrapper } from '../lib/blocks/src/components';
import { isChromatic } from './isChromatic';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/test/src/vitest-plugin/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const testStory = (
const _task = context.task as RunnerTask & { meta: TaskMeta & { storyId: string } };
_task.meta.storyId = composedStory.id;

await setViewport(composedStory.parameters.viewport);
await setViewport(composedStory.parameters, composedStory.globals);
await composedStory.run();
};
};
Loading

0 comments on commit a28553f

Please sign in to comment.