diff --git a/src/components/Article/Comment.module.scss b/src/components/Article/Comment.module.scss index a4f8dc15..ce52e65a 100644 --- a/src/components/Article/Comment.module.scss +++ b/src/components/Article/Comment.module.scss @@ -9,32 +9,11 @@ margin-bottom: 0; } - .comment { - &:before, - &:after { - content: ''; - left: 0; - position: absolute; - } - - &:before { - border-bottom: 2px solid #ccc; - border-left: 2px solid #ccc; - border-radius: 0 0 0 1.2rem; - top: -1rem; - height: 2.4rem; - width: 1.2rem; - } - - &:after { - background: #ccc; - height: 100%; - top: 0; - width: 2px; - } - - &:last-child:after { - display: none; + $levels: 0, 1, 2, 3, 4; + $padding: 1rem; + @each $level in $levels { + &.commentLevel-#{level} { + padding-left: $padding * $level; } } diff --git a/src/components/Article/Comment.tsx b/src/components/Article/Comment.tsx index ec3ba0bc..402ff5f5 100644 --- a/src/components/Article/Comment.tsx +++ b/src/components/Article/Comment.tsx @@ -51,8 +51,10 @@ export default (props: Props) => { formatDate(new Date(comment()?.createdAt), { hour: 'numeric', minute: 'numeric' }) ) + console.log('!!! lvl:', props.level) return ( -
  • +
  • + {props.level}