import React from 'react' import {Utils, Actions} from 'nylas-exports' export default class RelatedThreads extends React.Component { static displayName = "RelatedThreads"; static propTypes = { contact: React.PropTypes.object, contactThreads: React.PropTypes.array, } constructor(props) { super(props) this.state = {expanded: false} this.DEFAULT_NUM = 3 } static containerStyles = { order: 99, } _onClick(thread) { Actions.setFocus({collection: 'thread', item: thread}) } _toggle = () => { this.setState({expanded: !this.state.expanded}) } _renderToggle() { if (!this._hasToggle()) { return false; } const msg = this.state.expanded ? "Collapse" : "Show more" return (