1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

adding comments

This commit is contained in:
muerwre 2019-08-26 15:37:11 +07:00
parent c541278686
commit 76a3331719
14 changed files with 148 additions and 26 deletions

View file

@ -4,17 +4,21 @@ import { Comment } from '../Comment';
import { INode } from '~/redux/types';
import { CommentForm } from '../CommentForm';
import { Group } from '~/components/containers/Group';
import * as styles from './styles.scss';
import { Filler } from '~/components/containers/Filler';
interface IProps {
comments?: any;
}
const NodeComments: FC<IProps> = ({ comments }) => (
<Group>
{range(1, 6).map(el => (
<Comment key={el} />
<div className={styles.wrap}>
<Filler />
{comments.map(comment => (
<Comment key={comment.id} comment={comment} />
))}
</Group>
</div>
);
export { NodeComments };

View file

@ -0,0 +1,16 @@
.wrap {
display: flex;
flex-direction: column-reverse !important;
& > div {
margin: ($gap / 2) 0;
&:last-child {
margin-top: 0;
}
&:first-child {
margin-bottom: 0;
}
}
}