Skip to content

Commit 1262617

Browse files
feat: apply Chromatic viewport modes to HubHero story
1 parent 82e6a9b commit 1262617

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.storybook/modes.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export const allModes = {
2+
base: {
3+
viewport: "base",
4+
},
5+
sm: {
6+
viewport: "sm",
7+
},
8+
md: {
9+
viewport: "md",
10+
},
11+
lg: {
12+
viewport: "lg",
13+
},
14+
xl: {
15+
viewport: "xl",
16+
},
17+
"2xl": {
18+
viewport: "2xl",
19+
},
20+
}

src/components/Hero/HubHero/HubHero.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { useTranslation } from "next-i18next"
33
import { Box } from "@chakra-ui/react"
44
import { Meta, StoryObj } from "@storybook/react"
55

6+
import { allModes } from "../../../../.storybook/modes"
7+
68
import HubHeroComponent from "./"
79

810
type HubHeroType = typeof HubHeroComponent
@@ -12,6 +14,11 @@ const meta = {
1214
component: HubHeroComponent,
1315
parameters: {
1416
layout: "none",
17+
chromatic: {
18+
modes: {
19+
...allModes,
20+
},
21+
},
1522
},
1623
decorators: [
1724
(Story) => (

0 commit comments

Comments
 (0)