design: 댓글 디자인 수정

This commit is contained in:
jhynsoo 2024-08-11 23:21:14 +09:00
parent 97bccbcd44
commit b82cfb51ae
4 changed files with 27 additions and 15 deletions

View File

@ -3,9 +3,7 @@
flex-direction: column; flex-direction: column;
gap: 8px; gap: 8px;
width: 100%; width: 100%;
border: 1px solid var(--border-color); padding: 12px 0;
border-radius: 16px;
padding: 12px 16px;
box-sizing: border-box; box-sizing: border-box;
} }
@ -43,6 +41,7 @@
line-height: 1.4; line-height: 1.4;
margin: 0; margin: 0;
color: var(--text-color); color: var(--text-color);
word-break: break-word;
} }
.input { .input {

View File

@ -56,18 +56,22 @@ export default function FreeboardDetail({ topic, title, author, content, onDelet
<div> <div>
<p className={styles.content}>{content}</p> <p className={styles.content}>{content}</p>
</div> </div>
{comments &&
comments.map((comment) => ( {comments && (
<FreeboardComment <div className={styles.commentWrapper}>
key={comment.id} {comments.map((comment) => (
content={comment.content} <FreeboardComment
author={comment.name} key={comment.id}
commentId={comment.id} content={comment.content}
isMine={comment.mine} author={comment.name}
onDeleteSubmit={refetch} commentId={comment.id}
onEditSubmit={refetch} isMine={comment.mine}
/> onDeleteSubmit={refetch}
))} onEditSubmit={refetch}
/>
))}
</div>
)}
<FreeboardCommentInput onCommentSubmit={handleCommentSubmit} /> <FreeboardCommentInput onCommentSubmit={handleCommentSubmit} />
</div> </div>
); );

View File

@ -114,3 +114,11 @@
.delete { .delete {
color: var(--error-color); color: var(--error-color);
} }
.commentWrapper {
display: flex;
flex-direction: column;
border-top: 1px solid var(--border-color);
margin-top: 10px;
padding-top: 18px;
}

View File

@ -19,6 +19,7 @@
} }
& > main { & > main {
min-width: 0;
width: 100%; width: 100%;
} }
} }