add component list-comments
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.list-comments__item {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { default } from './list-comments';
|
||||
|
||||
require('./list-comments.scss');
|
||||
|
||||
require('./__item/list-comments__item.scss');
|
||||
@@ -0,0 +1,25 @@
|
||||
import { h, Component } from 'preact';
|
||||
|
||||
import { NODE_ID } from 'common/constants';
|
||||
|
||||
import Comment from 'components/comment';
|
||||
|
||||
export default class ListComments extends Component {
|
||||
render({ comments = [] }, state) {
|
||||
return (
|
||||
<div id={NODE_ID}>
|
||||
<div className="list-comments">
|
||||
{
|
||||
comments.map(comment => (
|
||||
<Comment
|
||||
data={comment}
|
||||
mods={{ level: 0, guest: true }}
|
||||
mix="list-comments__item"
|
||||
/>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.list-comments {
|
||||
position: relative;
|
||||
font-family: 'PT Sans', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
Reference in New Issue
Block a user