From a815aba77d82b20fae8fe35fe33f116625572840 Mon Sep 17 00:00:00 2001 From: seunghwan Date: Tue, 14 May 2024 20:59:47 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Resultlist=20=EC=8A=A4=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EB=B6=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/ResultList.stories.tsx | 31 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/components/main/ResultList.stories.tsx b/src/components/main/ResultList.stories.tsx index b4be3be..81c9ff4 100644 --- a/src/components/main/ResultList.stories.tsx +++ b/src/components/main/ResultList.stories.tsx @@ -2,6 +2,8 @@ import { Meta, StoryObj } from "@storybook/react"; import ResultList from "./ResultList"; import { ResultListType } from "@/src/types/searchResult"; import { fn } from "@storybook/test"; +import BookmarkBorder from "../../common/Image/BookmarkBorder"; +import Bookmark from "../../common/Image/Bookmark"; const meta = { title: "Components/ResultList", @@ -52,10 +54,29 @@ const sampleResults: ResultListType = { export const Basic: Story = { args: { searchResult: sampleResults, - renderBookmark: ({ onClick, isFavorites }) => ( - - ), + renderBookmark: ({ onClick, isFavorites }) => { + return isFavorites ? ( + ) => { + e.stopPropagation(); + onClick(e); + }} + width="16" + height="16" + cursor="pointer" + /> + ) : ( + ) => { + e.stopPropagation(); + onClick(e); + }} + width="16" + height="16" + fill="#007BE9" + cursor="pointer" + /> + ); + }, }, };