-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from jisung-in/88-pivoting
๋ฉ์ธ ํ์ด์ง ๋ฐฐ๋ ์ปดํฌ๋ํธ ์ ์ ๋ฐ ํ ํฌ๋ฃธ ์์ฑ ์ ํ์ด์ง ์ ์
- Loading branch information
Showing
14 changed files
with
237 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
src/app/components/MainSelectionCard/MainSelectionCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import RecordComponent from "@/assets/img/record.svg"; | ||
import QuestionComponent from "@/assets/img/question.svg"; | ||
import EvaluationComponent from "@/assets/img/evalutaion.svg"; | ||
import clsx from "clsx"; | ||
|
||
type MainSelectionCardType = { | ||
isMain: boolean; | ||
type: | ||
| "record" | ||
| "question" | ||
| "evaluation" | ||
| "smallerRecord" | ||
| "smallerQuestion" | ||
| "smallerEvaluation"; | ||
rounded: boolean; | ||
}; | ||
|
||
const obj = { | ||
record: { | ||
color: "#C08CF8", | ||
file: <RecordComponent className="w-40 h-40" />, | ||
text: "๊ธฐ๋ก", | ||
}, | ||
question: { | ||
color: "#FFCE55", | ||
file: <QuestionComponent className="w-40 h-40" />, | ||
text: "์ง๋ฌธ", | ||
}, | ||
evaluation: { | ||
color: "#FF9597", | ||
file: <EvaluationComponent className="w-40 h-40" />, | ||
text: "ํ๊ฐ", | ||
}, | ||
smallerRecord: { | ||
color: "#C08CF8", | ||
file: <RecordComponent className="w-8 h-8" />, | ||
text: "๊ธฐ๋ก", | ||
}, | ||
smallerQuestion: { | ||
color: "#FFCE55", | ||
file: <QuestionComponent className="w-8 h-8" />, | ||
text: "์ง๋ฌธ", | ||
}, | ||
smallerEvaluation: { | ||
color: "#FF9597", | ||
file: <EvaluationComponent className="w-6 h-6" />, | ||
text: "ํ๊ฐ", | ||
}, | ||
}; | ||
|
||
const MainSelectionCard = ({ | ||
isMain, | ||
type, | ||
rounded, | ||
}: MainSelectionCardType) => { | ||
const { color, file, text } = obj[type]; | ||
|
||
if (isMain) { | ||
return ( | ||
<div | ||
className="flex flex-col rounded-lg flex-1 text-brown-60 hover:text-white duration-200 cursor-pointer" | ||
style={{ backgroundColor: color }} | ||
> | ||
<span className="flex w-full text-[40px] pl-4 pt-4 font-bold"> | ||
{text} | ||
</span> | ||
<div className="flex w-full justify-end pr-4">{file}</div> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div | ||
className={clsx( | ||
"flex items-center justify-center rounded-lg p-2 px-4 gap-2", | ||
rounded && "rounded-[40px]", | ||
)} | ||
style={{ backgroundColor: color }} | ||
> | ||
<span className="flex text-[25px] font-bold text-brown-60">{text}</span> | ||
{file} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainSelectionCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
"use client"; | ||
|
||
import { Button } from "@/app/components/Button/Button"; | ||
import MainSelectionCard from "@/app/components/MainSelectionCard/MainSelectionCard"; | ||
import BackButton from "@/app/summary/_component/BackButton"; | ||
import clsx from "clsx"; | ||
import { useState } from "react"; | ||
import TalkRoomIcon from "@/assets/img/talk-icon.svg"; | ||
|
||
const TalkRoomSelection = () => { | ||
const [selection, setSelection] = useState("record"); | ||
|
||
return ( | ||
<div className="flex flex-col w-full min-h-[800px] bg-white px-[20%] py-10"> | ||
<BackButton /> | ||
|
||
<span className="flex items-center gap-4 text-[30px] font-bold py-4 border-b-[1px]"> | ||
ํ ํฌ๋ฐฉ ์์ฑ | ||
<TalkRoomIcon /> | ||
</span> | ||
<div className="flex flex-col gap-8"> | ||
<div | ||
className={clsx( | ||
"flex items-center hover:bg-purple-40 duration-500 hover:border-purple-50 cursor-pointer border-2 rounded-xl p-2 gap-4 text-lg font-bold text-gray-60", | ||
selection === "record" && | ||
"bg-purple-40 border-purple-50 text-[#000000]", | ||
)} | ||
onClick={() => setSelection("record")} | ||
> | ||
<MainSelectionCard | ||
isMain={false} | ||
type="smallerRecord" | ||
rounded={true} | ||
/> | ||
<span> | ||
๋ ์ ๊ธฐ๋ก์ ํผ์์ ํ ์ ์๋ ๊ณต๊ฐ์ผ๋ก, ์ฑ ์ ์ ํํ ํ ์ฑ ์ ๋ํ | ||
๋ด์ฉ์ ์คํฌ๋ฉ ํ ์ ์์ต๋๋ค. | ||
</span> | ||
</div> | ||
<div | ||
className={clsx( | ||
"flex items-center hover:bg-yellow-40 duration-500 hover:border-yellow-50 cursor-pointer border-2 rounded-xl p-2 gap-4 text-lg font-bold text-gray-60", | ||
selection === "question" && | ||
"text-[#000000] bg-yellow-40 border-yellow-50", | ||
)} | ||
onClick={() => setSelection("question")} | ||
> | ||
<MainSelectionCard | ||
isMain={false} | ||
type="smallerQuestion" | ||
rounded={true} | ||
/> | ||
<span> | ||
์ฑ ์ ๊ด๋ จํ ์ง๋ฌธ์ ์์ฑํ ์ ์๋ ๊ณต๊ฐ์ผ๋ก, ์ฑ ์ ์ ํ ํ ์ฑ ์ ๋ํ | ||
์ง๋ฌธ์ ์์ฑํด๋ณด์ธ์. | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<div className="flex w-full justify-end pt-8"> | ||
<div className="w-[100px]"> | ||
<Button variant="empty">๋ค์</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TalkRoomSelection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TalkRoomSelection from "./_component/TalkRoomSelection"; | ||
|
||
const TalkRoom = () => { | ||
return <div></div>; | ||
return <TalkRoomSelection />; | ||
}; | ||
|
||
export default TalkRoom; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.