Skip to content

Commit 0e2d5fc

Browse files
committed
feat(translation chart image): add translationchartimage story
1 parent 81b80c6 commit 0e2d5fc

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { Meta, StoryObj } from "@storybook/react"
2+
3+
import TranslationChartImageComponent from "."
4+
5+
const meta = {
6+
title: "Atoms / Media & Icons / TranslationChartImage",
7+
component: TranslationChartImageComponent,
8+
parameters: {
9+
layout: "fullscreen",
10+
},
11+
decorators: [
12+
(Story) => (
13+
<div className="max-w-3xl">
14+
<Story />
15+
</div>
16+
),
17+
],
18+
} satisfies Meta<typeof TranslationChartImageComponent>
19+
20+
export default meta
21+
22+
type Story = StoryObj<typeof meta>
23+
24+
export const TranslationChartImage: Story = {}

src/components/TranslationChartImage.tsx renamed to src/components/TranslationChartImage/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useColorModeValue } from "@chakra-ui/react"
22

3-
import { Image } from "@/components/Image"
3+
import { TwImage } from "@/components/Image"
44

55
import pageviewsDark from "@/public/images/translation-program/pageviews-dark.png"
66
import pageviewsLight from "@/public/images/translation-program/pageviews-light.png"
@@ -9,13 +9,10 @@ const TranslationChartImage = () => {
99
const ethImage = useColorModeValue(pageviewsLight, pageviewsDark)
1010

1111
return (
12-
<Image
12+
<TwImage
1313
src={ethImage}
1414
alt=""
15-
style={{ objectFit: "contain" }}
16-
minW="263px"
17-
h={500}
18-
w="auto"
15+
className="h-[500px] w-auto min-w-[263px] object-contain"
1916
/>
2017
)
2118
}

0 commit comments

Comments
 (0)