import React from 'react'; import LetterTile from './letter-tile.jsx'; export default class Chip extends React.PureComponent { constructor(props) { super(props); this.handleCancel = this.handleCancel.bind(this); } handleCancel() { this.props.onCancel(this.props.topic, this.props.index); } render() { var title = this.props.title || this.props.topic; return (
{this.props.noAvatar ? :
} {title} {this.props.onCancel && !this.props.required ? × : }
); } };