Skip to content

Commit

Permalink
Merge pull request #13774 from Baystef/feat/translationchartimage-story
Browse files Browse the repository at this point in the history
Create story tests for TranslationChartImage component [#13734]
  • Loading branch information
corwintines authored Sep 3, 2024
2 parents b7c4fe8 + 0e2d5fc commit 79e057d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Meta, StoryObj } from "@storybook/react"

import TranslationChartImageComponent from "."

const meta = {
title: "Atoms / Media & Icons / TranslationChartImage",
component: TranslationChartImageComponent,
parameters: {
layout: "fullscreen",
},
decorators: [
(Story) => (
<div className="max-w-3xl">
<Story />
</div>
),
],
} satisfies Meta<typeof TranslationChartImageComponent>

export default meta

type Story = StoryObj<typeof meta>

export const TranslationChartImage: Story = {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useColorModeValue } from "@chakra-ui/react"

import { Image } from "@/components/Image"
import { TwImage } from "@/components/Image"

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

return (
<Image
<TwImage
src={ethImage}
alt=""
style={{ objectFit: "contain" }}
minW="263px"
h={500}
w="auto"
className="h-[500px] w-auto min-w-[263px] object-contain"
/>
)
}
Expand Down

0 comments on commit 79e057d

Please sign in to comment.