From e4e432e209dffb1ed104526ec77d2c1f5dce59d8 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sun, 11 Mar 2018 20:34:32 +0300 Subject: [PATCH] add component list-comments --- .../__item/list-comments__item.scss | 5 ++++ web/app/components/list-comments/index.js | 5 ++++ .../list-comments/list-comments.jsx | 25 +++++++++++++++++++ .../list-comments/list-comments.scss | 4 +++ 4 files changed, 39 insertions(+) create mode 100644 web/app/components/list-comments/__item/list-comments__item.scss create mode 100644 web/app/components/list-comments/index.js create mode 100644 web/app/components/list-comments/list-comments.jsx create mode 100644 web/app/components/list-comments/list-comments.scss diff --git a/web/app/components/list-comments/__item/list-comments__item.scss b/web/app/components/list-comments/__item/list-comments__item.scss new file mode 100644 index 00000000..ab4412d3 --- /dev/null +++ b/web/app/components/list-comments/__item/list-comments__item.scss @@ -0,0 +1,5 @@ +.list-comments__item { + &:last-child { + margin-bottom: 0; + } +} diff --git a/web/app/components/list-comments/index.js b/web/app/components/list-comments/index.js new file mode 100644 index 00000000..4cae2ce1 --- /dev/null +++ b/web/app/components/list-comments/index.js @@ -0,0 +1,5 @@ +export { default } from './list-comments'; + +require('./list-comments.scss'); + +require('./__item/list-comments__item.scss'); diff --git a/web/app/components/list-comments/list-comments.jsx b/web/app/components/list-comments/list-comments.jsx new file mode 100644 index 00000000..349b1420 --- /dev/null +++ b/web/app/components/list-comments/list-comments.jsx @@ -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 ( +
+
+ { + comments.map(comment => ( + + )) + } +
+
+ ); + } +} diff --git a/web/app/components/list-comments/list-comments.scss b/web/app/components/list-comments/list-comments.scss new file mode 100644 index 00000000..e4f0b120 --- /dev/null +++ b/web/app/components/list-comments/list-comments.scss @@ -0,0 +1,4 @@ +.list-comments { + position: relative; + font-family: 'PT Sans', Helvetica, Arial, sans-serif; +}