From d3ed791ab52eaddb7690869bb1cd982453badd95 Mon Sep 17 00:00:00 2001
From: Florian Orben <florian.orben@gmail.com>
Date: Sat, 31 Oct 2015 03:22:02 +0100
Subject: attachments frontend

---
 web/react/components/post_attachment_list.jsx | 32 +++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 web/react/components/post_attachment_list.jsx

(limited to 'web/react/components/post_attachment_list.jsx')

diff --git a/web/react/components/post_attachment_list.jsx b/web/react/components/post_attachment_list.jsx
new file mode 100644
index 000000000..03b866656
--- /dev/null
+++ b/web/react/components/post_attachment_list.jsx
@@ -0,0 +1,32 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+const PostAttachment = require('./post_attachment.jsx');
+
+export default class PostAttachmentList extends React.Component {
+    constructor(props) {
+        super(props);
+    }
+
+    render() {
+        let content = [];
+        this.props.attachments.forEach((attachment, i) => {
+            content.push(
+                <PostAttachment
+                    attachment={attachment}
+                    key={'att_' + i}
+                />
+            );
+        });
+
+        return (
+            <div className='attachment_list'>
+                {content}
+            </div>
+        );
+    }
+}
+
+PostAttachmentList.propTypes = {
+    attachments: React.PropTypes.array.isRequired
+};
-- 
cgit v1.2.3-1-g7c22

