mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 10:09:56 +00:00
Merge pull request #1594 from LemmyNet/comment-border
Only give child comments colored borders
This commit is contained in:
commit
46ab522143
1 changed files with 6 additions and 2 deletions
|
@ -79,7 +79,7 @@ export class CommentNodes extends Component<CommentNodesProps, any> {
|
|||
const maxComments = this.props.maxCommentsShown ?? this.props.nodes.length;
|
||||
|
||||
const borderColor = this.props.depth
|
||||
? colorList[this.props.depth % colorList.length]
|
||||
? colorList[(this.props.depth - 1) % colorList.length]
|
||||
: colorList[0];
|
||||
|
||||
return (
|
||||
|
@ -89,7 +89,11 @@ export class CommentNodes extends Component<CommentNodesProps, any> {
|
|||
"ms-1": !!this.props.isChild,
|
||||
"border-top border-light": !this.props.noBorder,
|
||||
})}
|
||||
style={`border-left: 2px solid ${borderColor} !important;`}
|
||||
style={
|
||||
this.props.isChild
|
||||
? `border-left: 2px solid ${borderColor} !important;`
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{this.props.nodes.slice(0, maxComments).map(node => (
|
||||
<CommentNode
|
||||
|
|
Loading…
Reference in a new issue