Skip to content

Commit

Permalink
update CommentViewer styling
Browse files Browse the repository at this point in the history
  • Loading branch information
glenwid committed May 3, 2021
1 parent b7be194 commit 34782a2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 31 deletions.
6 changes: 5 additions & 1 deletion src/components/CommentViewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

.comments {
padding: 0.5em 0.5em 0.5em 1em;
border-bottom: 1px solid #f0f0f0;
}

.infoComments {
padding: 0.5em 0.5em 0.5em 1em;
border-top: 1px solid #f0f0f0;
}

.ant-collapse {
Expand Down
63 changes: 33 additions & 30 deletions src/components/CommentViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,41 +289,44 @@ export const CommentViewer: React.FC<CommentViewerProps> = ({
)}
</div>

<div className="comments">
{comments.map((comment, key) => {
if (comment.type === 'mildInfo') {
return (
<div
style={{
paddingTop: '0.5em',
paddingLeft: '0.15em'
}}
>
<Comment
key={key}
content={comment.content}
author={
{comments.find(element => element.type === 'mildInfo') && (
<div className="infoComments">
{comments.map((comment, key) => {
if (comment.type === 'mildInfo') {
return (
<div
style={{ display: 'flex', flexDirection: 'row' }}
>
<InfoCircleTwoTone
twoToneColor="#FAC302"
style={{
paddingTop: '0.25em',
paddingRight: '0.5em'
paddingTop: '0.5em',
paddingLeft: '0.15em'
}}
>
<Comment
key={key}
content={comment.content}
author={
<div
style={{ display: 'flex', flexDirection: 'row' }}
>
<InfoCircleTwoTone
twoToneColor="#FAC302"
style={{
paddingTop: '0.25em',
paddingRight: '0.5em'
}}
/>
<p>{comment.author}</p>
</div>
}
/>
<p>{comment.author}</p>
</div>
}
/>
</div>
)
} else {
return <></>
}
})}
</div>
)
} else {
return <></>
}
})}
</div>
)}

</>
) : (
<>
Expand Down
1 change: 1 addition & 0 deletions src/components/ReplyEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
width: available;
padding-top: 0.5em;
padding-right: 0.5em;
padding-bottom: 0.5em;
}

.controlElementsReply {
Expand Down

0 comments on commit 34782a2

Please sign in to comment.