Skip to content

Commit

Permalink
Merge pull request #1173 from alectrocute/collapse-expand-align-comment
Browse files Browse the repository at this point in the history
Left-align comment collapse/expand button
  • Loading branch information
SleeplessOne1917 authored Jun 11, 2023
2 parents 8f3a43d + d1d18cf commit b6841b4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/shared/components/comment/comment-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
})}
>
<div className="d-flex flex-wrap align-items-center text-muted small">
<button
className="btn btn-sm text-muted mr-2"
onClick={linkEvent(this, this.handleCommentCollapse)}
aria-label={this.expandText}
data-tippy-content={this.expandText}
>
<Icon icon={`${this.state.collapsed ? "plus" : "minus"}-square`} classes="icon-inline" />
</button>
<span className="mr-2">
<PersonListing person={cv.creator} />
</span>
Expand Down Expand Up @@ -270,18 +278,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</Link>
</>
)}
<button
className="btn btn-sm text-muted"
onClick={linkEvent(this, this.handleCommentCollapse)}
aria-label={this.expandText}
data-tippy-content={this.expandText}
>
{this.state.collapsed ? (
<Icon icon="plus-square" classes="icon-inline" />
) : (
<Icon icon="minus-square" classes="icon-inline" />
)}
</button>
{this.linkBtn(true)}
{cv.comment.language_id !== 0 && (
<span className="badge d-none d-sm-inline mr-2">
Expand Down

0 comments on commit b6841b4

Please sign in to comment.