Skip to content

Commit

Permalink
🚧 [#584] Keep more viewports in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Dec 27, 2023
1 parent 7de3749 commit eaf8248
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
8 changes: 0 additions & 8 deletions .storybook/modes.js

This file was deleted.

13 changes: 8 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
withClearSubmissionLocalStorage,
} from './decorators';
import {reactIntl} from './reactIntl.js';
import {allModes} from "./modes";

initialize({
onUnhandledRequest: 'bypass',
Expand Down Expand Up @@ -56,9 +55,12 @@ export default {
parameters: {
actions: {argTypesRegex: '^on[A-Z].*'},
viewport: {
// These are the viewports that are shown in Storybook
viewports: {
small: { name: "Small", styles: { width: "640px", height: "800px" } },
large: { name: "Large", styles: { width: "1024px", height: "1000px" } },
smallMobile: { name: "Small mobile", styles: { width: "320px", height: "568px" } },
largeMobile: { name: "Large mobile", styles: { width: "414px", height: "896px" } },
tablet: { name: "Tablet", styles: { width: "834px", height: "1112px" } },
desktop: { name: "Desktop", styles: { width: "1024px", height: "1000px" } },
},
},
controls: {
Expand Down Expand Up @@ -93,9 +95,10 @@ export default {
},
},
chromatic: {
// Here we specify the viewports of which we want snapshots in Chromatic
modes: {
mobile: allModes.mobile,
desktop: allModes.desktop
mobile: {viewport: "smallMobile"},
desktop: {viewport: "desktop"}
}
}
},
Expand Down

0 comments on commit eaf8248

Please sign in to comment.