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(