Making comment collapse and lightning buttons not spans. Fixes #884

This commit is contained in:
Dessalines 2020-07-09 10:44:05 -04:00
parent 558644b8b3
commit 20f9bde88f

View File

@ -189,8 +189,8 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</Link>
</>
)}
<div
className="mr-lg-4 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2"
<button
class="btn btn-sm text-muted"
onClick={linkEvent(this, this.handleCommentCollapse)}
>
{this.state.collapsed ? (
@ -202,9 +202,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<use xlinkHref="#icon-minus-square"></use>
</svg>
)}
</div>
<span
className={`unselectable pointer ${this.scoreColor}`}
</button>
{/* This is an expanding spacer for mobile */}
<div className="mr-lg-4 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2"></div>
<button
className={`btn btn-sm p-0 unselectable pointer ${this.scoreColor}`}
onClick={linkEvent(node, this.handleCommentUpvote)}
data-tippy-content={this.pointsTippy}
>
@ -212,7 +214,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<use xlinkHref="#icon-zap"></use>
</svg>
<span class="mr-1">{this.state.score}</span>
</span>
</button>
<span className="mr-1"></span>
<span>
<MomentTime data={node.comment} />