Skip to content

Commit 6845fbd

Browse files
committed
feat: TipsMenu 컴포넌트 개발
1 parent 7cb8884 commit 6845fbd

File tree

5 files changed

+65
-1
lines changed

5 files changed

+65
-1
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/App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
import TipsMenu from "./components/TipsMenu";
2+
13
function App() {
2-
return;
4+
return (
5+
<div>
6+
<TipsMenu mode="topic" />
7+
<TipsMenu mode="conversation" />
8+
<TipsMenu mode="temporature" />
9+
</div>
10+
);
311
}
412

513
export default App;

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)