Skip to content

Commit

Permalink
issue #291 refactor: comment text area style refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sikkzz committed May 31, 2024
1 parent a0ee477 commit 7a245ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@ export const textareaBoxStyle = css({
width: "100%",
});

export const commentTextareaStyle = (width: number | string, height: number) =>
css({
border: `1px solid ${Theme.color.border}`,
borderRadius: "4px",
width,
height,
padding: "20px 74px 20px 20px",
fontSize: "16px",
fontWeight: 500,
outline: "none",
overflowWrap: "break-word",
wordBreak: "break-all",
whiteSpace: "pre-wrap",
resize: "none",
fontFamily: "Pretendard",
});
export const commentTextareaStyle = css({
border: `1px solid ${Theme.color.border}`,
borderRadius: "4px",
width: "100%",
height: "112px",
padding: "20px 74px 20px 20px",
fontSize: "16px",
fontWeight: 500,
outline: "none",
overflowWrap: "break-word",
wordBreak: "break-all",
whiteSpace: "pre-wrap",
resize: "none",
fontFamily: "Pretendard",
});

export const commentCardBoxStyle = css({
width: "100%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Comment = ({ boardId }: { boardId: number }) => {
<Box css={textareaBoxStyle}>
<textarea
placeholder="인터넷은 우리가 함께 만들어가는 소중한 공간입니다. 댓글 작성 시 타인에 대한 배려와 책임을 담아주세요."
css={commentTextareaStyle("100%", 113)}
css={commentTextareaStyle}
value={commentContent}
onChange={(e) => handleCommentContent(e.target.value)}
ref={commentTextAreaRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ReplyInput = ({
<Box css={replyInputBoxStyle}>
<textarea
placeholder="인터넷은 우리가 함께 만들어가는 소중한 공간입니다. 댓글 작성 시 타인에 대한 배려와 책임을 담아주세요."
css={commentTextareaStyle("100%", 113)}
css={commentTextareaStyle}
value={content}
onChange={(e) => handleCommentContent(e.target.value)}
ref={replyRef}
Expand Down

0 comments on commit 7a245ef

Please sign in to comment.