From f7b04f0f275cb70e8dc045a1257cedade81e6a8e Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 25 Feb 2016 11:25:16 -0500 Subject: Merged contents of MoreDirectChannelsModal and ChannelMembersModal into UserList --- web/react/components/user_list.jsx | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 web/react/components/user_list.jsx (limited to 'web/react/components/user_list.jsx') diff --git a/web/react/components/user_list.jsx b/web/react/components/user_list.jsx new file mode 100644 index 000000000..e3c2ad08d --- /dev/null +++ b/web/react/components/user_list.jsx @@ -0,0 +1,53 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import {FormattedMessage} from 'mm-intl'; +import UserListRow from './user_list_row.jsx'; + +export default class UserList extends React.Component { + render() { + const users = this.props.users; + + let content; + if (users.length > 0) { + content = users.map((user) => { + return ( + + ); + }); + } else { + content = ( + + + + + + ); + } + + return ( + + + {content} + +
+ ); + } +} + +UserList.defaultProps = { + users: [], + actions: [] +}; + +UserList.propTypes = { + users: React.PropTypes.arrayOf(React.PropTypes.object), + actions: React.PropTypes.arrayOf(React.PropTypes.func) +}; -- cgit v1.2.3-1-g7c22