Skip to content

Commit 3f869a3

Browse files
feat(Hero): apply chromatic viewport modes to all Hero stories
1 parent ddbaf97 commit 3f869a3

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

src/components/Hero/ContentHero/ContentHero.stories.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
import { useTranslation } from "next-i18next"
22
import { Meta, StoryObj } from "@storybook/react"
33

4+
import { allModes } from "../../../../.storybook/modes"
5+
import contentHeroImg from "../../../../public/mainnet.png"
6+
47
import ContentHeroComponent, { ContentHeroProps } from "."
58

69
type ContentHeroType = typeof ContentHeroComponent
710

8-
import contentHeroImg from "../../../../public/mainnet.png"
9-
1011
const meta = {
1112
title: "Organisms / Layouts / Hero",
1213
component: ContentHeroComponent,
1314
parameters: {
1415
layout: "none",
16+
chromatic: {
17+
modes: {
18+
...allModes,
19+
},
20+
},
1521
},
1622
argTypes: {
1723
heroImg: {

src/components/Hero/HomeHero/HomeHero.stories.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import * as React from "react"
22
import { Meta, StoryObj } from "@storybook/react"
33

4+
import { allModes } from "../../../../.storybook/modes"
5+
import homeHeroImg from "../../../../public/home/hero.png"
6+
47
import HomeHeroComponent from "."
58

69
type HomeHeroType = typeof HomeHeroComponent
@@ -10,6 +13,11 @@ const meta = {
1013
component: HomeHeroComponent,
1114
parameters: {
1215
layout: "none",
16+
chromatic: {
17+
modes: {
18+
...allModes,
19+
},
20+
},
1321
},
1422
argTypes: {
1523
heroImg: {
@@ -22,8 +30,6 @@ const meta = {
2230

2331
export default meta
2432

25-
import homeHeroImg from "../../../../public/home/hero.png"
26-
2733
export const HomeHero: StoryObj<typeof meta> = {
2834
args: {
2935
heroImg: homeHeroImg,

src/components/Hero/MdxHero/MdxHero.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { HStack } from "@chakra-ui/react"
22
import { Meta, StoryObj } from "@storybook/react"
33

4+
import { allModes } from "../../../../.storybook/modes"
5+
46
import MdxHeroComponent from "./"
57

68
type MdxHeroType = typeof MdxHeroComponent
@@ -9,6 +11,11 @@ const meta = {
911
title: "Organisms / Layouts / Hero",
1012
parameters: {
1113
layout: "none",
14+
chromatic: {
15+
modes: {
16+
...allModes,
17+
},
18+
},
1219
},
1320
decorators: [
1421
(Story) => (

0 commit comments

Comments
 (0)