From 021709b86aeff9793d5ad7788e0e2d7cacb11c00 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 7 Aug 2024 00:39:22 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=85=20style:=20=ED=8F=89=EC=A0=90=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=20=EB=B0=98?= =?UTF-8?q?=EA=B0=9C=20=EB=B3=84=20=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20#15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/icons/HALF_STAR_ICON.svg | 8 ++++---- src/components/rating/Rating.stories.tsx | 19 ++----------------- src/components/rating/Ratings.tsx | 11 ++--------- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/src/components/icons/HALF_STAR_ICON.svg b/src/components/icons/HALF_STAR_ICON.svg index a28e37a..f54f85c 100644 --- a/src/components/icons/HALF_STAR_ICON.svg +++ b/src/components/icons/HALF_STAR_ICON.svg @@ -1,9 +1,9 @@ - + - + - - + + diff --git a/src/components/rating/Rating.stories.tsx b/src/components/rating/Rating.stories.tsx index 3841f23..910f0cb 100644 --- a/src/components/rating/Rating.stories.tsx +++ b/src/components/rating/Rating.stories.tsx @@ -26,23 +26,8 @@ export const FIVE: Story = { rating: 5, }, }; -export const FOUR: Story = { +export const FourPointFive: Story = { args: { - rating: 4, - }, -}; -export const THREE: Story = { - args: { - rating: 3, - }, -}; -export const TWO: Story = { - args: { - rating: 2, - }, -}; -export const ONE: Story = { - args: { - rating: 1, + rating: 4.5, }, }; diff --git a/src/components/rating/Ratings.tsx b/src/components/rating/Ratings.tsx index 681d112..a635c13 100644 --- a/src/components/rating/Ratings.tsx +++ b/src/components/rating/Ratings.tsx @@ -1,6 +1,6 @@ import React, { FC } from "react"; -import { StarIcon } from "../icons"; +import { HalfStarIcon, StarIcon } from "../icons"; interface Props { rating: number; @@ -22,14 +22,7 @@ const Ratings: FC = ({ rating }) => { ); } else if (roundedRating >= i - 0.5) { // TODO: 반쪽 별로 아이콘 교체 필요 - stars.push( - , - ); + stars.push(); } else { stars.push(