-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
87 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
40 changes: 40 additions & 0 deletions
40
client/src/composition/Feed/FeedComment/CommentPresentor.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,40 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import Profile from 'components/Profile'; | ||
import { Comment } from 'react-components.d'; | ||
|
||
const CommentBubble = styled.div` | ||
background-color: #f2f3f5; | ||
border-radius: 18px; | ||
box-sizing: border-box; | ||
color: #1c1e21; | ||
display: inline-block; | ||
line-height: 16px; | ||
margin: 0; | ||
max-width: 100%; | ||
word-wrap: break-word; | ||
white-space: normal; | ||
word-break: break-word; | ||
`; | ||
|
||
const CommentText = styled.p` | ||
padding: 8px 10px; | ||
`; | ||
|
||
// 역할 : | ||
const CommentPresentor = ({ content }: Comment) => { | ||
return ( | ||
<> | ||
<Profile | ||
imageUrl={process.env.PUBLIC_URL + '/images/profile.jpg'} | ||
alt={'profile image'} | ||
size="32px" | ||
/> | ||
<CommentBubble> | ||
<CommentText>댓글 : {content}</CommentText> | ||
</CommentBubble> | ||
</> | ||
); | ||
}; | ||
|
||
export default CommentPresentor; |
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,35 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import Profile from 'components/Profile'; | ||
import CommentPresentor from './CommentPresentor'; | ||
import { Comment, Maybe } from 'react-components.d'; | ||
|
||
// comment | ||
const CommentDiv = styled.div` | ||
border-top: 1px solid #dadde1; | ||
padding: 4px 12px; | ||
`; | ||
|
||
// 역할 : | ||
const CommentContainer = ({ comment }: { comment: Comment }) => { | ||
return ( | ||
<> | ||
<CommentDiv> | ||
<div> | ||
<CommentPresentor content={comment.content} /> | ||
<div> | ||
<Profile | ||
imageUrl={process.env.PUBLIC_URL + '/images/profile.jpg'} | ||
alt={'profile image'} | ||
size="32px" | ||
/> | ||
<input type="text"></input> | ||
<input type="button" value="입력"></input> | ||
</div> | ||
</div> | ||
</CommentDiv> | ||
</> | ||
); | ||
}; | ||
|
||
export default CommentContainer; |