Skip to content

Commit 596e24c

Browse files
authored
Merge pull request #13262 from Baystef/feat/mergeinfographic-story
Create story tests for MergeInfoGraphic component [#13242]
2 parents 45070df + 1bc2532 commit 596e24c

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

.storybook/i18next.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const ns = [
2121
"page-upgrades",
2222
"page-developers-index",
2323
"page-what-is-ethereum",
24+
"page-upgrades-index",
2425
] as const
2526
const supportedLngs = Object.keys(baseLocales)
2627

src/@chakra-ui/components/Accordion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const { defineMultiStyleConfig, definePartsStyle } =
66

77
const baseStyle = definePartsStyle({
88
container: {
9-
'& > :is(h2, h3)': {
9+
"& > :is(h2, h3)": {
1010
fontSize: "initial",
11-
fontWeight: 'initial'
12-
}
11+
fontWeight: "initial",
12+
},
1313
},
1414
button: {
1515
py: "2",
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Box } from "@chakra-ui/react"
2+
import { Meta, StoryObj } from "@storybook/react"
3+
4+
import { ContentContainer } from "@/components/MdComponents"
5+
6+
import { langViewportModes } from "../../../.storybook/modes"
7+
8+
import MergeInfographicComponent from "."
9+
10+
const meta = {
11+
title: "Atoms / Media & Icons / MergeInfographic",
12+
component: MergeInfographicComponent,
13+
parameters: {
14+
layout: "fullscreen",
15+
chromatic: {
16+
modes: {
17+
...langViewportModes,
18+
},
19+
},
20+
},
21+
decorators: [
22+
(Story) => (
23+
<Box maxW="1008px" mx="auto">
24+
<ContentContainer>
25+
<Story />
26+
</ContentContainer>
27+
</Box>
28+
),
29+
],
30+
} satisfies Meta<typeof MergeInfographicComponent>
31+
32+
export default meta
33+
34+
type Story = StoryObj<typeof meta>
35+
36+
export const MergeInfographic: Story = {}

src/components/ui/__stories__/Heading.stories.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const meta = {
2020
},
2121
decorators: [
2222
(Story) => (
23-
<Center className='flex-col min-h-[100vh]'>
23+
<Center className="min-h-[100vh] flex-col">
2424
<Story />
2525
</Center>
2626
),
@@ -31,7 +31,7 @@ export default meta
3131

3232
type Story = StoryObj<typeof meta>
3333

34-
const headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const
34+
const headings = ["h1", "h2", "h3", "h4", "h5", "h6"] as const
3535

3636
export const Heading: Story = {
3737
render: () => (
@@ -42,9 +42,7 @@ export const Heading: Story = {
4242
</div>
4343
<Stack>
4444
{headings.map((Heading) => (
45-
<Heading key={Heading}>
46-
{`${Heading} base component`}
47-
</Heading>
45+
<Heading key={Heading}>{`${Heading} base component`}</Heading>
4846
))}
4947
</Stack>
5048
</>

0 commit comments

Comments
 (0)