Skip to content

Commit d1ab379

Browse files
committed
Merge branch 'dev' into i18n-next-intl
2 parents 247e318 + 9a82216 commit d1ab379

File tree

32 files changed

+294
-398
lines changed

32 files changed

+294
-398
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import type { StorybookConfig } from "@storybook/nextjs"
1717
const config: StorybookConfig = {
1818
stories: [
1919
"../src/components/**/*.stories.{ts,tsx}",
20-
"../src/@chakra-ui/stories/*.stories.tsx",
2120
"../src/layouts/stories/*.stories.tsx",
21+
"../src/styles/*.stories.tsx",
2222
],
2323
addons: [
2424
"@storybook/addon-links",

src/@chakra-ui/stories/Colors.stories.tsx

Lines changed: 0 additions & 187 deletions
This file was deleted.

src/components/Banners/DismissableBanner/DismissableBanner.stories.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from "react"
22
import { FaInfoCircle } from "react-icons/fa"
3-
import { Center, Container, Icon, Text } from "@chakra-ui/react"
43
import { Meta, StoryObj } from "@storybook/react"
54

5+
import { Center } from "@/components/ui/flex"
6+
67
import DismissableBanner from "."
78

89
const meta = {
@@ -13,9 +14,9 @@ const meta = {
1314
},
1415
decorators: [
1516
(Story) => (
16-
<Container mx="auto" maxW="1504px">
17+
<div className="mx-auto max-w-[1504px]">
1718
<Story />
18-
</Container>
19+
</div>
1920
),
2021
],
2122
} satisfies Meta<typeof DismissableBanner>
@@ -26,19 +27,19 @@ type Story = StoryObj<typeof meta>
2627
export const Basic: Story = {
2728
args: {
2829
storageKey: "dismissable-banner-1",
29-
children: <Text>This is a dismissable banner notification.</Text>,
30+
children: <p>This is a dismissable banner notification.</p>,
3031
},
3132
}
3233

3334
export const WithLongText: Story = {
3435
args: {
3536
storageKey: "dismissable-banner-2",
3637
children: (
37-
<Text>
38+
<p>
3839
This is a dismissable banner with a very long text content to see how it
3940
handles overflow and wrapping. It should be able to manage the text
4041
properly without breaking the layout.
41-
</Text>
42+
</p>
4243
),
4344
},
4445
}
@@ -48,7 +49,7 @@ export const WithIcon: Story = {
4849
storageKey: "dismissable-banner-3",
4950
children: (
5051
<Center>
51-
<Icon as={FaInfoCircle} mr={2} />
52+
<FaInfoCircle className="me-2" />
5253
This banner includes an icon.
5354
</Center>
5455
),

src/components/Breadcrumbs/Breadcrumbs.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as React from "react"
2-
import { Stack } from "@chakra-ui/react"
31
import { Meta, type StoryObj } from "@storybook/react"
42

3+
import { Stack } from "../ui/flex"
4+
55
import BreadcrumbsComponent from "."
66

77
const meta = {
@@ -13,7 +13,7 @@ export default meta
1313

1414
export const Breadcrumbs: StoryObj = {
1515
render: () => (
16-
<Stack spacing="8">
16+
<Stack className="gap-8">
1717
<BreadcrumbsComponent slug="/en/staking/" />
1818
<BreadcrumbsComponent slug="/en/staking/solo/" />
1919
<BreadcrumbsComponent slug="/en/roadmap/merge/issuance/" />

src/components/Card/Card.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useTranslations } from "next-intl"
2-
import { Box } from "@chakra-ui/react"
32
import { Meta, type StoryObj } from "@storybook/react"
43

54
import { Button } from "../ui/buttons/Button"
@@ -10,9 +9,9 @@ const meta = {
109
component: CardComponent,
1110
decorators: [
1211
(Story) => (
13-
<Box maxW="342px" margin="0 auto">
12+
<div className="max-w-[342px]">
1413
<Story />
15-
</Box>
14+
</div>
1615
),
1716
],
1817
} satisfies Meta<typeof CardComponent>

src/components/DocLink/DocLink.stories.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import * as React from "react"
2-
import { VStack } from "@chakra-ui/react"
31
import { Meta, StoryObj } from "@storybook/react"
42

3+
import { VStack } from "../ui/flex"
4+
55
import DocLink from "."
66

77
const meta = {
88
title: "Molecules / Navigation / DocLink",
99
component: DocLink,
10-
tags: ["autodocs"],
1110
} satisfies Meta<typeof DocLink>
1211

1312
export default meta
@@ -19,11 +18,6 @@ export const Default: Story = {
1918
href: "/history/",
2019
children: "History of Ethereum",
2120
},
22-
render: (args) => (
23-
<VStack spacing={4} align="stretch">
24-
<DocLink {...args} />
25-
</VStack>
26-
),
2721
}
2822

2923
export const ExternalLink: Story = {
@@ -32,19 +26,14 @@ export const ExternalLink: Story = {
3226
children: "Ethereum Website",
3327
isExternal: true,
3428
},
35-
render: (args) => (
36-
<VStack spacing={4} align="stretch">
37-
<DocLink {...args} />
38-
</VStack>
39-
),
4029
}
4130

4231
export const MultipleLinks: Story = {
4332
args: {
4433
href: "#",
4534
},
4635
render: () => (
47-
<VStack spacing={4} align="stretch">
36+
<VStack className="items-stretch gap-4">
4837
<DocLink href="/history/">History of Ethereum</DocLink>
4938
<DocLink href="https://ethereum.org" isExternal>
5039
Ethereum Website

src/components/FeedbackWidget/FeedbackWidget.stories.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import * as React from "react"
2-
import { Box, Stack } from "@chakra-ui/react"
32
import { Meta, StoryObj } from "@storybook/react"
43
import { expect, fireEvent, waitFor, within } from "@storybook/test"
54

5+
import { Stack } from "../ui/flex"
6+
67
import FeedbackWidget from "./"
78

89
const meta = {
@@ -13,8 +14,8 @@ const meta = {
1314
component: FeedbackWidget,
1415
decorators: [
1516
(Story) => (
16-
<Stack minH="100vh" position="relative">
17-
<Box flex="1" />
17+
<Stack className="relative min-h-[100vh] gap-0">
18+
<div className="flex-1" />
1819
<Story />
1920
</Stack>
2021
),
@@ -25,12 +26,9 @@ export default meta
2526

2627
type Story = StoryObj<typeof meta>
2728

28-
export const WidgetButton: Story = {
29-
render: () => <FeedbackWidget />,
30-
}
29+
export const WidgetButton: Story = {}
3130

3231
export const WidgetModal: Story = {
33-
render: () => <FeedbackWidget />,
3432
play: async ({ canvasElement }) => {
3533
// Add delay for snapshot capture of the modal
3634
const canvas = within(canvasElement)

src/components/Glossary/GlossaryTooltip/GlossaryTooltip.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Center } from "@chakra-ui/react"
21
import { Meta, StoryObj } from "@storybook/react"
32

3+
import { Center } from "@/components/ui/flex"
4+
45
import GlossaryTooltipComponent from "."
56

67
const meta = {
@@ -12,7 +13,7 @@ const meta = {
1213
},
1314
decorators: [
1415
(Story) => (
15-
<Center boxSize="md">
16+
<Center className="size-128">
1617
<Story />
1718
</Center>
1819
),

0 commit comments

Comments
 (0)