diff options
Diffstat (limited to 'webapp/components/post_attachment_list.jsx')
-rw-r--r-- | webapp/components/post_attachment_list.jsx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/webapp/components/post_attachment_list.jsx b/webapp/components/post_attachment_list.jsx new file mode 100644 index 000000000..7da9efbee --- /dev/null +++ b/webapp/components/post_attachment_list.jsx @@ -0,0 +1,30 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import PostAttachment from './post_attachment.jsx'; + +import React from 'react'; + +export default class PostAttachmentList extends React.Component { + 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 +}; |