Skip to content

Commit c35d3c4

Browse files
committed
feat(bannergridcell): add story for bannergrid cell component [closes #13046]
1 parent 9407766 commit c35d3c4

File tree

1 file changed

+61
-28
lines changed

1 file changed

+61
-28
lines changed

src/components/BannerGrid/BannerGrid.stories.tsx

Lines changed: 61 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import stats from "@/public/images/upgrades/newrings.png"
2222

2323
const meta = {
24-
title: "Molecules / Display Content / Banner",
24+
title: "Molecules / Display Content / Banner Grid",
2525
component: BannerComponent,
2626
parameters: {
2727
layout: "fullscreen",
@@ -59,19 +59,50 @@ export const Banner: Story = {
5959
export const BannerBody: Story = {
6060
render: () => {
6161
return (
62-
<BannerBodyComponent>
63-
<div>What </div>
64-
</BannerBodyComponent>
62+
<BannerComponent>
63+
<BannerBodyComponent>
64+
<div>What </div>
65+
</BannerBodyComponent>
66+
</BannerComponent>
6567
)
6668
},
6769
}
6870

6971
export const BannerImage: Story = {
7072
render: () => {
7173
return (
72-
<BannerImageComponent>
73-
<Image src={stats} alt="" width={400} />
74-
</BannerImageComponent>
74+
<BannerComponent>
75+
<BannerImageComponent>
76+
<Image src={stats} alt="" width={400} />
77+
</BannerImageComponent>
78+
</BannerComponent>
79+
)
80+
},
81+
}
82+
83+
export const BannerGridCell: Story = {
84+
render: () => {
85+
const PAGE_WHAT_IS_ETH = "page-what-is-ethereum"
86+
return (
87+
<BannerComponent>
88+
<BannerGridCellComponent>
89+
<Box fontSize="5xl" mb={4} lineHeight={1}>
90+
4k+
91+
</Box>
92+
<Box fontSize="md" color="text200">
93+
{getTranslation(
94+
"page-what-is-ethereum-ethereum-in-numbers-stat-1-desc",
95+
PAGE_WHAT_IS_ETH
96+
)}
97+
<Text as="span" whiteSpace="nowrap">
98+
&nbsp;
99+
<Box as="span">
100+
<Icon as={MdInfoOutline} verticalAlign="middle" />
101+
</Box>
102+
</Text>
103+
</Box>
104+
</BannerGridCellComponent>
105+
</BannerComponent>
75106
)
76107
},
77108
}
@@ -80,27 +111,29 @@ export const BannerGrid: Story = {
80111
render: () => {
81112
const PAGE_WHAT_IS_ETH = "page-what-is-ethereum"
82113
return (
83-
<BannerGridComponent>
84-
{Array.from({ length: 6 }, (_, i) => i + 1).map((item) => (
85-
<BannerGridCellComponent key={item}>
86-
<Box fontSize="5xl" mb={4} lineHeight={1}>
87-
{item}k+
88-
</Box>
89-
<Box fontSize="md" color="text200">
90-
{getTranslation(
91-
"page-what-is-ethereum-ethereum-in-numbers-stat-1-desc",
92-
PAGE_WHAT_IS_ETH
93-
)}
94-
<Text as="span" whiteSpace="nowrap">
95-
&nbsp;
96-
<Box as="span">
97-
<Icon as={MdInfoOutline} verticalAlign="middle" />
98-
</Box>
99-
</Text>
100-
</Box>
101-
</BannerGridCellComponent>
102-
))}
103-
</BannerGridComponent>
114+
<BannerComponent>
115+
<BannerGridComponent>
116+
{Array.from({ length: 6 }, (_, i) => i + 1).map((item) => (
117+
<BannerGridCellComponent key={item}>
118+
<Box fontSize="5xl" mb={4} lineHeight={1}>
119+
{item}k+
120+
</Box>
121+
<Box fontSize="md" color="text200">
122+
{getTranslation(
123+
"page-what-is-ethereum-ethereum-in-numbers-stat-1-desc",
124+
PAGE_WHAT_IS_ETH
125+
)}
126+
<Text as="span" whiteSpace="nowrap">
127+
&nbsp;
128+
<Box as="span">
129+
<Icon as={MdInfoOutline} verticalAlign="middle" />
130+
</Box>
131+
</Text>
132+
</Box>
133+
</BannerGridCellComponent>
134+
))}
135+
</BannerGridComponent>
136+
</BannerComponent>
104137
)
105138
},
106139
}

0 commit comments

Comments
 (0)