Skip to content

Commit

Permalink
πŸ’… style: 평점 μ»΄ν¬λ„ŒνŠΈμ— 반개 별 μ•„μ΄μ½˜ μΆ”κ°€ #15
Browse files Browse the repository at this point in the history
  • Loading branch information
froggy1014 committed Aug 6, 2024
1 parent 9697eca commit 021709b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 30 deletions.
8 changes: 4 additions & 4 deletions src/components/icons/HALF_STAR_ICON.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 2 additions & 17 deletions src/components/rating/Rating.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
11 changes: 2 additions & 9 deletions src/components/rating/Ratings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from "react";

import { StarIcon } from "../icons";
import { HalfStarIcon, StarIcon } from "../icons";

interface Props {
rating: number;
Expand All @@ -22,14 +22,7 @@ const Ratings: FC<Props> = ({ rating }) => {
);
} else if (roundedRating >= i - 0.5) {
// TODO: 반μͺ½ λ³„λ‘œ μ•„μ΄μ½˜ ꡐ체 ν•„μš”
stars.push(
<StarIcon
key={i}
width="12px"
height="12px"
className="text-primary-02"
/>,
);
stars.push(<HalfStarIcon key={i} width="12px" height="12px" />);
} else {
stars.push(
<StarIcon
Expand Down

0 comments on commit 021709b

Please sign in to comment.