Skip to content

Commit 91afe94

Browse files
authored
Merge pull request #22 from MBTips/feature/ChatTips-컴포넌트-개발
feat: TipsMenu 컴포넌트 개발
2 parents 4f48252 + c4a229b commit 91afe94

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

public/icon/lightbulb.svg

Lines changed: 10 additions & 0 deletions
Loading

public/icon/starbubble.svg

Lines changed: 4 additions & 0 deletions
Loading

public/icon/thermometer.svg

Lines changed: 9 additions & 0 deletions
Loading

src/components/TipsMenu.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const TipsMenu = ({
2+
mode
3+
}: {
4+
mode: "topic" | "conversation" | "temporature";
5+
}) => {
6+
let text = "";
7+
let imageUrl = "";
8+
switch (mode) {
9+
case "topic":
10+
text = "대화 주제 추천";
11+
imageUrl = "/icon/starbubble.svg";
12+
break;
13+
case "conversation":
14+
text = "대화 꿀팁";
15+
imageUrl = "/icon/lightbulb.svg";
16+
break;
17+
case "temporature":
18+
text = "현재 대화의 온도 측정하기";
19+
imageUrl = "/icon/thermometer.svg";
20+
break;
21+
default:
22+
return;
23+
}
24+
25+
return (
26+
<div className="flex bg-white px-4 py-4 border-gray-100 border-b w-[375px] h-[56px]">
27+
<img src={imageUrl} alt={text} width={20} height={20} />
28+
<h2 className="ml-[22px] font-medium text-2lg text-gray-800">{text}</h2>
29+
</div>
30+
);
31+
};
32+
33+
export default TipsMenu;

0 commit comments

Comments
 (0)