Skip to content

Commit

Permalink
Pass story parameters to tab options
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal2228 committed May 10, 2022
1 parent dc35f4b commit 5a3796e
Show file tree
Hide file tree
Showing 88 changed files with 16 additions and 12 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
10 changes: 0 additions & 10 deletions examples/react/loki.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,10 @@ module.exports = {
width: 1366,
height: 768,
},
'chrome.laptop.dark': {
target: 'chrome.docker',
width: 1366,
height: 768,
features: [{ name: 'prefers-color-scheme', value: 'dark' }],
},
'chrome.iphone7': {
target: 'chrome.docker',
preset: 'iPhone 7',
},
'chrome.iphone7.dark': {
target: 'chrome.docker',
preset: 'iPhone 7 Dark Mode',
},
'chrome.a4': {
target: 'chrome.docker',
preset: 'A4 Paper',
Expand Down
18 changes: 16 additions & 2 deletions examples/react/src/api/Media.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,22 @@ export const MediaAwareComponent = () => (

MediaAwareComponent.storyName = 'with media queries';

export const FeaturesAwareComponent = () => (
export const LightSchemeComponent = () => (
<div className="FeaturesAwareComponent" />
);

FeaturesAwareComponent.storyName = 'with color scheme queries';
LightSchemeComponent.parameters = {
loki: { features: [{ name: 'prefers-color-scheme', value: 'light' }] },
};

LightSchemeComponent.storyName = 'with light scheme queries';

export const DarkSchemeComponent = () => (
<div className="FeaturesAwareComponent" />
);

DarkSchemeComponent.parameters = {
loki: { features: [{ name: 'prefers-color-scheme', value: 'dark' }] },
};

DarkSchemeComponent.storyName = 'with dark scheme queries';

0 comments on commit 5a3796e

Please sign in to comment.