Skip to content

Commit 695cdcd

Browse files
committed
feat: 팝업을 제외한 채팅방 컴포넌트 레이아웃 구현 완료
1 parent 4733490 commit 695cdcd

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import styled from 'styled-components';
2+
import ChatHeader from './ChatHeader';
3+
import ChatInput from './ChatInput';
4+
import ChatList from './ChatList';
5+
import ChatQuestionSection from './ChatQuestionSection';
6+
7+
interface ChatRoomProps {}
8+
9+
export const ChatRoom = ({}: ChatRoomProps) => {
10+
return (
11+
<ChatRoomContainer>
12+
<ChatHeader />
13+
14+
<ChatQuestionSection />
15+
16+
<ChatListContainer>
17+
<ChatList />
18+
</ChatListContainer>
19+
20+
<ChatInputContainer>
21+
<ChatInput type="normal" />
22+
</ChatInputContainer>
23+
</ChatRoomContainer>
24+
);
25+
};
26+
export default ChatRoom;
27+
28+
const ChatRoomContainer = styled.aside`
29+
display: flex;
30+
flex-direction: column;
31+
height: 100%;
32+
width: 380px;
33+
border-left: 1px solid ${({ theme }) => theme.tokenColors['surface-alt']};
34+
background: ${({ theme }) => theme.tokenColors['surface-default']};
35+
`;
36+
37+
const ChatListContainer = styled.div`
38+
display: flex;
39+
flex: 1;
40+
flex-direction: column;
41+
justify-content: end;
42+
overflow-y: auto;
43+
`;
44+
45+
const ChatInputContainer = styled.div`
46+
padding: 10px 20px;
47+
`;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import styled from 'styled-components';
2+
3+
interface LayerPopupProps {}
4+
5+
export const LayerPopup = ({}: LayerPopupProps) => {
6+
return (
7+
<LayerPopupContainer>
8+
<LayerPopupWrapper>
9+
<LayerPopupButton>📢 채팅 규칙</LayerPopupButton>
10+
</LayerPopupWrapper>
11+
</LayerPopupContainer>
12+
);
13+
};
14+
export default LayerPopup;
15+
16+
const LayerPopupContainer = styled.div`
17+
width: 262px;
18+
background-color: #373a3f;
19+
border-radius: 7px;
20+
box-shadow: 0px 4px 4px 0px #3c444b3c;
21+
padding: 5px;
22+
gap: 1px;
23+
${({ theme }) => theme.tokenTypographys['display-bold14']}
24+
color: ${({ theme }) => theme.tokenColors['color-white']};
25+
`;
26+
27+
const LayerPopupWrapper = styled.div`
28+
:hover {
29+
background-color: #5e5e61;
30+
}
31+
`;
32+
33+
const LayerPopupButton = styled.button`
34+
width: 100%;
35+
text-align: start;
36+
padding: 8px;
37+
border-radius: 9px;
38+
${({ theme }) => theme.tokenTypographys['display-bold14']}
39+
color: ${({ theme }) => theme.tokenColors['color-white']};
40+
cursor: pointer;
41+
`;

frontend/src/components/chat/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ChatRoom } from './ChatRoom';

0 commit comments

Comments
 (0)