import React from 'react'; import PropTypes from 'prop-types'; import { Tooltip } from 'reactstrap'; import ModalPortal from '../modal-portal'; import FileParticipantDialog from '../dialog/file-participant-dialog'; import { serviceURL, gettext } from '../../utils/constants'; import '../../css/participants-list.css'; const propTypes = { onParticipantsChange: PropTypes.func.isRequired, participants: PropTypes.array.isRequired, repoID: PropTypes.string.isRequired, filePath: PropTypes.string.isRequired, showIconTip: PropTypes.bool.isRequired, }; class ParticipantsList extends React.Component { constructor(props) { super(props); this.state = { showDialog : false, tooltipOpen: false, }; } toggleDialog = () => { this.setState({ showDialog: !this.state.showDialog }); } tooltipToggle = () => { this.setState({ tooltipOpen: !this.state.tooltipOpen }); } render() { const { participants, repoID, filePath, showIconTip } = this.props; return (
{participants.map((item, index) => { return avatar; })} {showIconTip && {gettext('Add participants')} } {this.state.showDialog && }
); } } ParticipantsList.propTypes = propTypes; export default ParticipantsList;