summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_attachment_list.jsx
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-10-31 03:22:02 +0100
committerFlorian Orben <florian.orben@gmail.com>2015-11-05 23:33:21 +0100
commitd3ed791ab52eaddb7690869bb1cd982453badd95 (patch)
tree2d54a05d955ac860794492d4c129fad8ebc231cc /web/react/components/post_attachment_list.jsx
parentd96cb50b68adca9f035c7582f1ceefdde64fb4f7 (diff)
downloadchat-d3ed791ab52eaddb7690869bb1cd982453badd95.tar.gz
chat-d3ed791ab52eaddb7690869bb1cd982453badd95.tar.bz2
chat-d3ed791ab52eaddb7690869bb1cd982453badd95.zip
attachments frontend
Diffstat (limited to 'web/react/components/post_attachment_list.jsx')
-rw-r--r--web/react/components/post_attachment_list.jsx32
1 files changed, 32 insertions, 0 deletions
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
+};