-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
261 additions
and
3 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
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,155 @@ | ||
import styled from 'styled-components'; | ||
import CommentItem from './notice_components/CommentItem'; | ||
|
||
const Container = styled.div` | ||
width: 100%; | ||
height: 100vh; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
background-color: ${({ theme }) => theme.colors.neutral[100]}; | ||
`; | ||
|
||
const HeaderContainer = styled.div` | ||
width: 100%; | ||
top: 0; | ||
left: 0; | ||
z-index: 1000; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 20px; | ||
border-bottom: 1px solid #dcdcdc; | ||
background-color: white; | ||
`; | ||
|
||
const PreviousButton = styled.button` | ||
width: 24px; | ||
height: 24px; | ||
background-color: blue; | ||
cursor: pointer; | ||
`; | ||
|
||
const HeaderTitle = styled.div` | ||
flex-grow: 1; | ||
text-align: center; | ||
color: ${({ theme }) => theme.colors.neutral[600]}; | ||
font-size: 20px; | ||
font-weight: 700; | ||
`; | ||
|
||
const MoreButton = styled.div` | ||
width: 24px; | ||
height: 24px; | ||
background-color: red; | ||
cursor: pointer; | ||
`; | ||
|
||
const ContentContainer = styled.div` | ||
width: 100%; | ||
height: 100vh; | ||
box-sizing: border-box; | ||
overflow: auto; | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
const NoticeContainer = styled.div` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 0 20px; | ||
background-color: white; | ||
`; | ||
|
||
const NoticeTitle = styled.h1` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 16px 0; | ||
border-bottom: 1px solid #dcdcdc; | ||
font-size: 16px; | ||
font-weight: 600; | ||
color: ${({ theme }) => theme.colors.neutral[600]}; | ||
`; | ||
|
||
const NoticeContent = styled.p` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 16px 0; | ||
padding-bottom: 200px; | ||
border-bottom: 1px solid #dcdcdc; | ||
font-size: 16px; | ||
color: ${({ theme }) => theme.colors.neutral[500]}; | ||
`; | ||
|
||
const CommentContainer = styled.div` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 0 20px; | ||
background-color: white; | ||
`; | ||
|
||
const FooterContainer = styled.div` | ||
width: 100%; | ||
height: 64px; | ||
padding: 8px 16px; | ||
box-sizing: border-box; | ||
border-top: 1px solid #dcdcdc; | ||
background-color: white; | ||
`; | ||
|
||
const InputContainer = styled.div` | ||
width: 100%; | ||
`; | ||
|
||
const Input = styled.input` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 10px; | ||
border: none; | ||
border-radius: 8px; | ||
border-bottom: 1px solid #dcdcdc; | ||
font-size: 16px; | ||
font-weight: 400; | ||
background-color: ${({ theme }) => theme.colors.neutral[100]}; | ||
&:focus { | ||
outline: none; | ||
border: 1px solid ${({ theme }) => theme.colors.main[500]}; | ||
} | ||
`; | ||
|
||
const NoticeDetail = ({ closeNoticeDetail }) => { | ||
return ( | ||
<Container> | ||
<HeaderContainer> | ||
<PreviousButton onClick={closeNoticeDetail} /> | ||
<HeaderTitle>공지사항</HeaderTitle> | ||
<MoreButton /> | ||
</HeaderContainer> | ||
<ContentContainer> | ||
<NoticeContainer> | ||
<NoticeTitle>이건 공지 제목</NoticeTitle> | ||
<NoticeContent>이건 공지 내용</NoticeContent> | ||
</NoticeContainer> | ||
<CommentContainer> | ||
<CommentItem name="다인" comment="댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글댓글1댓글댓글" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글2" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글3" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글1" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글1" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글1" date="2024.07.23"/> | ||
<CommentItem name="다인" comment="댓글1" date="2024.07.23"/> | ||
</CommentContainer> | ||
</ContentContainer> | ||
<FooterContainer> | ||
<InputContainer> | ||
<Input placeholder='댓글을 입력하세요.'/> | ||
</InputContainer> | ||
</FooterContainer> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default NoticeDetail; |
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,68 @@ | ||
import styled from 'styled-components'; | ||
|
||
const Container = styled.div` | ||
border-bottom: 1px solid rgba(221, 221, 221, 0.5); | ||
padding: 16px 0px; | ||
display: flex; | ||
flex-direction: row; | ||
`; | ||
|
||
const ProfileImage = styled.div` | ||
width: 40px; | ||
height: 40px; | ||
border-radius: 12px; | ||
margin-right: 8px; | ||
background-color: pink; | ||
`; | ||
|
||
const ContentContainer = styled.div` | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
margin-right: 12px; | ||
`; | ||
|
||
const Name = styled.div` | ||
font-size: 14px; | ||
font-weight: 600; | ||
color: ${({ theme }) => theme.colors.neutral[700]}; | ||
margin-bottom: 4px; | ||
`; | ||
|
||
const CommentText = styled.div` | ||
font-size: 14px; | ||
font-weight: 400; | ||
color: ${({ theme }) => theme.colors.neutral[700]}; | ||
margin-bottom: 4px; | ||
`; | ||
|
||
const CommentDate = styled.div` | ||
font-size: 12px; | ||
color: ${({ theme }) => theme.colors.neutral[300]}; | ||
`; | ||
|
||
const MoreButton = styled.button` | ||
width: 16px; | ||
height: 16px; | ||
background: blue; | ||
border: none; | ||
cursor: pointer; | ||
`; | ||
|
||
|
||
// TODO: 프로필이미지도 props로 보내야함 | ||
const CommentItem = ({ name, comment, date }) => { | ||
return ( | ||
<Container> | ||
<ProfileImage /> | ||
<ContentContainer> | ||
<Name>{name}</Name> | ||
<CommentText>{comment}</CommentText> | ||
<CommentDate>{date}</CommentDate> | ||
</ContentContainer> | ||
<MoreButton /> | ||
</Container> | ||
); | ||
} | ||
|
||
export default CommentItem; |
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