-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat: input, chatbox, aiνλ‘ν UI μ»΄ν¬λνΈ μμ± * Feat: μ±ν ai νλ‘ν, μ±ν header UI ꡬν * Style: font, color μ μ© νμ λ³κ²½
- Loading branch information
Showing
26 changed files
with
418 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* { | ||
box-sizing: border-box; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,6 @@ | ||
export { ReactComponent as DadaChat } from './dada-chat.svg'; | ||
export { ReactComponent as LuluChat } from './lulu-chat.svg'; | ||
export { ReactComponent as ChichiChat } from './chichi-chat.svg'; | ||
export { ReactComponent as LeftChevron } from './left-shavron.svg'; | ||
export { ReactComponent as CalendarIcon } from './calendar-icon.svg'; | ||
export { ReactComponent as Plus } from './plus.svg'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
@import '../../styles/variables/colors.scss'; | ||
@import '../../styles/variables/fonts.scss'; | ||
|
||
.container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 10px; | ||
width: 100%; | ||
height: 56px; | ||
position: fixed; | ||
top: 0; | ||
background-color: $WH; | ||
.title { | ||
flex-grow: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: bold; | ||
@include sub18; | ||
} | ||
} |
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,24 @@ | ||
import React from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import styles from './ChatHeader.module.scss'; | ||
import { LeftChevron, CalendarIcon } from '../../assets'; | ||
|
||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const ChatHeader = ({ children }: IProps) => { | ||
const navigate = useNavigate(); | ||
const onGoBack = () => { | ||
navigate(-1); | ||
}; | ||
return ( | ||
<div className={styles.container}> | ||
<LeftChevron onClick={onGoBack} /> | ||
<h3 className={styles.title}>{children}</h3> | ||
<CalendarIcon /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ChatHeader; |
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,14 @@ | ||
@import '../../styles/variables/fonts.scss'; | ||
|
||
.container { | ||
display: flex; | ||
gap: 10px; | ||
.messagesWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
.aiName { | ||
@include body14; | ||
} | ||
} | ||
} |
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,33 @@ | ||
import { DadaChat, LuluChat, ChichiChat } from '../../assets'; | ||
import LeftChatBox from '../../components/common/LeftChatBox'; | ||
import styles from './AiChatBox.module.scss'; | ||
|
||
interface IProps { | ||
ai: string; | ||
} | ||
|
||
const AiChatBox = ({ ai }: IProps) => { | ||
return ( | ||
<> | ||
<div className={styles.container}> | ||
{ai === 'dada' ? ( | ||
<DadaChat /> | ||
) : ai === 'lulu' ? ( | ||
<LuluChat /> | ||
) : ( | ||
<ChichiChat /> | ||
)} | ||
<div className={styles.messagesWrapper}> | ||
<p className={styles.aiName}> | ||
{ai === 'dada' ? 'λ€λ€' : ai === 'lulu' ? '루루' : 'μΉμΉ'} | ||
</p> | ||
<LeftChatBox>μ΄λ κ²! μ΄λ κ²!</LeftChatBox> | ||
<LeftChatBox>{`I'm μ§μ μ΄μμ`}</LeftChatBox> | ||
<LeftChatBox>μ₯μΆ©λ μμ‘±λ° λ³΄μ!</LeftChatBox> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default AiChatBox; |
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,21 @@ | ||
@import '../../styles/variables/colors.scss'; | ||
@import '../../styles/variables/fonts.scss'; | ||
|
||
.wrapper { | ||
display: flex; | ||
width: 100%; | ||
.message { | ||
border-top-right-radius: 20px; | ||
border-bottom-right-radius: 20px; | ||
border-bottom-left-radius: 20px; | ||
background-color: $BK30; | ||
padding: 12px; | ||
max-width: 180px; | ||
} | ||
.time { | ||
display: flex; | ||
align-items: flex-end; | ||
@include navRegular; | ||
color: $BK70; | ||
} | ||
} |
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,17 @@ | ||
import React from 'react'; | ||
import styles from './LeftChatBox.module.scss'; | ||
|
||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const LeftChatBox = ({ children }: IProps) => { | ||
return ( | ||
<div className={styles.wrapper}> | ||
<div className={styles.message}>{children}</div> | ||
<span className={styles.time}>μ€μ 9:54</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LeftChatBox; |
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,23 @@ | ||
@import '../../styles/variables/colors.scss'; | ||
@import '../../styles/variables/fonts.scss'; | ||
|
||
.wrapper { | ||
display: flex; | ||
width: 100%; | ||
justify-content: flex-end; | ||
.message { | ||
border-top-left-radius: 20px; | ||
border-bottom-right-radius: 20px; | ||
border-bottom-left-radius: 20px; | ||
background-color: $primary_default; | ||
padding: 12px; | ||
max-width: 180px; | ||
color: $WH; | ||
} | ||
.time { | ||
display: flex; | ||
align-items: flex-end; | ||
@include navRegular; | ||
color: $BK70; | ||
} | ||
} |
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,17 @@ | ||
import React from 'react'; | ||
import styles from './RightChatBox.module.scss'; | ||
|
||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const RightChatBox = ({ children }: IProps) => { | ||
return ( | ||
<div className={styles.wrapper}> | ||
<span className={styles.time}>μ€μ 9:54</span> | ||
<div className={styles.message}>{children}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RightChatBox; |
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,4 +1,45 @@ | ||
@import '../../styles/variables/colors.scss'; | ||
.example { | ||
background-color: $orange; | ||
@import '../../styles/variables/fonts.scss'; | ||
|
||
.messagesContainer { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
gap: 20px; | ||
padding: 10px; | ||
margin-top: 56px; | ||
margin-bottom: 48px; | ||
} | ||
.aiChanged { | ||
display: flex; | ||
justify-content: center; | ||
@include caption; | ||
color: $BK70; | ||
} | ||
|
||
.inputBox { | ||
display: flex; | ||
justify-content: space-between; | ||
position: fixed; | ||
bottom: 0; | ||
width: 100%; | ||
height: 48px; | ||
.plusBtn { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border: none; | ||
background-color: transparent; | ||
} | ||
.input { | ||
flex-grow: 1; | ||
border: none; | ||
outline: none; | ||
} | ||
.submitBtn { | ||
width: 56px; | ||
border: none; | ||
background-color: $primary_default; | ||
color: $WH; | ||
} | ||
} |
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,7 +1,30 @@ | ||
import styles from './Chat.module.scss'; | ||
import { Plus } from '../../assets'; | ||
import RightChatBox from '../../components/common/RightChatBox'; | ||
import ChatHeader from '../../components/Headers/ChatHeader'; | ||
import AiChatBox from '../../components/common/AiChatBox'; | ||
|
||
const Chat = () => { | ||
return <div className={styles.example}>Chat</div>; | ||
return ( | ||
<div> | ||
<ChatHeader>λ€λ€</ChatHeader> | ||
<div className={styles.messagesContainer}> | ||
<AiChatBox ai="dada" /> | ||
<RightChatBox>곡μ΅κ²½λ³΄! 곡μ΅κ²½λ³΄!</RightChatBox> | ||
<p | ||
className={styles.aiChanged} | ||
>{`λν μλκ° '루루'λ‘ λ³κ²½λμμ΅λλ€.`}</p> | ||
<AiChatBox ai="lulu" /> | ||
</div> | ||
<div className={styles.inputBox}> | ||
<button className={styles.plusBtn}> | ||
<Plus /> | ||
</button> | ||
<input className={styles.input} /> | ||
<button className={styles.submitBtn}>μ μ‘</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Chat; |
Oops, something went wrong.