SelectedMember.js 1.1 KB
import React,{PropTypes} from 'react'; 
import {Table,ButtonGroup,Button,Modal,OverlayTrigger,Input,FormControls,Grid,Row,Col} from 'react-bootstrap'; 
import Select from 'react-select';
import 'react-select/dist/react-select.css'; 
import cx from 'classnames';
import s from './SelectedMember.scss';



class SelectedMember extends React.Component {
	constructor (props, context) {
	    super(props, context);
		this.remove=this.remove.bind(this);
	    
	}
	static propTypes={
		onDelete: PropTypes.func,
		imageUrl:PropTypes.string,
		name:PropTypes.string,
		uuid:PropTypes.string
	} 

	remove(){
		const{uuid,onDelete}= this.props;
		onDelete(uuid);
	}

	render(){
		
		const {imageUrl,name,uuid}= this.props;
		const imageStyle = {'backgroundImage': 'url('+imageUrl+')'};
		return(
				<div className={cx(s.member_token)}>
					<span className={cx(s.member_image, s.thumb_24)} style={imageStyle}>
					</span>
						{name}
					<i className={cx(s.ts_icon, s.ts_icon_times, s.ts_icon_inherit, s.remove_member_icon)} onClick={this.remove}>
					</i>
				</div>
			);
			
		}
}
 


export default SelectedMember;