Skip to content

Commit 3e2ad0d

Browse files
committed
chore: Restaurant List Section 스타일 수정
1 parent 5b30a90 commit 3e2ad0d

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

src/components/tag/Tag.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ import type { ComponentProps } from "react";
44
const tagVariants = cva(
55
[
66
"ygi:inline-flex ygi:items-center ygi:justify-center",
7-
"ygi:bg-surface-primary ygi:text-text-interactive",
87
"ygi:caption-12-sb ygi:whitespace-nowrap",
98
],
109
{
1110
variants: {
11+
theme: {
12+
primary: ["ygi:bg-surface-primary ygi:text-text-interactive"],
13+
secondary: ["ygi:bg-surface-gray ygi:text-text-secondary"],
14+
},
1215
size: {
1316
medium: ["ygi:px-2 ygi:py-1", "ygi:rounded-sm"],
1417
small: ["ygi:h-4 ygi:px-1 ygi:py-0", "ygi:rounded-xs"],
1518
},
1619
},
1720
defaultVariants: {
1821
size: "medium",
22+
theme: "primary",
1923
},
2024
},
2125
);
@@ -25,9 +29,14 @@ export type TagProps = Omit<ComponentProps<"span">, "children" | "className"> &
2529
children: string;
2630
};
2731

28-
export const Tag = ({ size = "medium", children, ...props }: TagProps) => {
32+
export const Tag = ({
33+
size = "medium",
34+
theme = "primary",
35+
children,
36+
...props
37+
}: TagProps) => {
2938
return (
30-
<span className={tagVariants({ size })} {...props}>
39+
<span className={tagVariants({ size, theme })} {...props}>
3140
{children}
3241
</span>
3342
);

src/pageComponents/gathering/opinion/ResultView.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,26 @@ export const ResultView = ({ recommendationResult }: ResultViewProps) => {
8585

8686
{/* Restaurant List Section */}
8787
<section className="ygi:flex ygi:flex-col ygi:gap-3">
88-
<h2 className="ygi:heading-18-bd ygi:text-text-primary">
88+
<h2 className="ygi:heading-22-bd ygi:text-text-primary">
8989
약속 장소는 여기 어때요?
9090
</h2>
91-
<div className="ygi:rounded-xl ygi:bg-surface-white ygi:p-4">
92-
<span className="ygi:caption-12-sb ygi:text-text-secondary">
91+
<div className="ygi:space-y-4 ygi:rounded-md ygi:bg-surface-white ygi:p-4">
92+
<p className="ygi:body-16-bd ygi:text-text-primary">
9393
요기잇 추천 맛집
94-
</span>
95-
<div className="ygi:mt-3 ygi:flex ygi:flex-col">
94+
</p>
95+
<div className="ygi:flex ygi:flex-col ygi:gap-4 ygi:divide-y ygi:divide-dashed ygi:divide-border-default">
9696
{[
9797
recommendationResult.topRecommendation,
9898
...recommendationResult.otherCandidates,
99-
].map((restaurant, index, arr) => (
100-
<div key={restaurant.restaurantId}>
99+
].map((restaurant, index) => (
100+
<div
101+
key={restaurant.restaurantId}
102+
className="ygi:not-last:pb-4"
103+
>
101104
<OtherCandidateCard
102105
restaurant={restaurant}
103106
ranking={index + 1}
104107
/>
105-
{index < arr.length - 1 && (
106-
<div className="ygi:my-4 ygi:h-px ygi:bg-border-default" />
107-
)}
108108
</div>
109109
))}
110110
</div>

src/pageComponents/gathering/restaurantCard/OtherCandidateCard.tsx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ export const OtherCandidateCard = ({
3131

3232
return (
3333
<article
34-
className="ygi:flex ygi:items-start ygi:overflow-hidden"
34+
className="ygi:flex ygi:cursor-pointer ygi:items-start ygi:gap-5 ygi:overflow-hidden"
3535
aria-label={`${ranking}위 추천 음식점: ${restaurant.restaurantName}`}
36+
onClick={handleMapClick}
3637
>
37-
<div className="ygi:relative ygi:h-20 ygi:w-20 ygi:shrink-0 ygi:overflow-clip ygi:rounded ygi:border ygi:border-border-default ygi:bg-surface-lightgray">
38+
<div className="ygi:relative ygi:h-20 ygi:w-20 ygi:shrink-0 ygi:overflow-clip ygi:rounded-xs ygi:bg-surface-lightgray ygi:inset-ring-1 ygi:inset-ring-border-default">
3839
<Image
3940
src={
4041
restaurant.imageUrl ??
@@ -46,36 +47,28 @@ export const OtherCandidateCard = ({
4647
/>
4748
</div>
4849

49-
<div className="ygi:flex ygi:flex-1 ygi:flex-col ygi:justify-center ygi:gap-2 ygi:px-5">
50-
<button
51-
onClick={handleMapClick}
52-
className="ygi:flex ygi:cursor-pointer ygi:items-center ygi:text-left"
53-
>
54-
<h3 className="ygi:body-14-bd ygi:text-text-primary">
55-
{restaurant.restaurantName}
56-
</h3>
57-
<ChevronRightIcon
58-
size={24}
59-
className="ygi:text-text-primary"
60-
/>
61-
</button>
50+
<div className="ygi:flex ygi:flex-1 ygi:flex-col ygi:justify-center">
51+
<h3 className="ygi:mb-1 ygi:body-14-bd ygi:text-text-primary">
52+
{restaurant.restaurantName}
53+
</h3>
6254

63-
<div className="ygi:flex ygi:items-center ygi:gap-1">
55+
<div className="ygi:mb-2 ygi:flex ygi:items-center ygi:gap-1">
6456
<StarIcon size={14} color="#FF5A3C" />
6557
<span className="ygi:body-14-bd ygi:text-text-secondary">
66-
{restaurant.rating.toFixed(1)} ({restaurant.reviewCount})
58+
{restaurant.rating.toFixed(1)} ({restaurant.reviewCount}
59+
)
6760
</span>
6861
</div>
6962

7063
<div className="ygi:flex ygi:flex-wrap ygi:gap-2">
64+
<Tag size="medium" theme="secondary">
65+
{FOOD_CATEGORY_LABEL[restaurant.largeCategory]}
66+
</Tag>
7167
{restaurant.majorityDistanceRange !== "ANY" && (
72-
<Tag size="medium">
68+
<Tag size="medium" theme="secondary">
7369
{`역에서 도보 ${DISTANCE_RANGE_WALKING_MINUTES[restaurant.majorityDistanceRange]}분`}
7470
</Tag>
7571
)}
76-
<Tag size="medium">
77-
{FOOD_CATEGORY_LABEL[restaurant.largeCategory]}
78-
</Tag>
7972
</div>
8073
</div>
8174
</article>

0 commit comments

Comments
 (0)